refactor(tests): ux tests to follow test rules#3245
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR refactors the UX core test suite to reduce duplication and improve consistency by consolidating many per-flow tests into parametrized tests with shared helpers.
Changes:
- Consolidates multiple test cases into
pytest.mark.parametrizepatterns across basic/DAG/decorators/config/resume/compliance/compilation suites. - Introduces shared helper functions (assertion callbacks and deployment/run helpers) to reduce repeated boilerplate.
- Improves docstrings, typing annotations, and minor formatting for readability.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| test/ux/core/test_utils.py | Normalizes scheduler args and updates run-tracking helper to use wait_for_runs_by_tags. |
| test/ux/core/test_sfn_compilation.py | Parametrizes “standard” SFN compilation tests and cleans up imports/structure. |
| test/ux/core/test_resume.py | Consolidates resume tests with a helper and parametrized scenarios. |
| test/ux/core/test_lifecycle.py | Moves markers to module scope and adds typing annotations. |
| test/ux/core/test_decorators.py | Refactors decorator tests into assertion callbacks + a single parametrized runner. |
| test/ux/core/test_dag.py | Consolidates DAG topology tests into one parametrized test + assertion callbacks. |
| test/ux/core/test_config.py | Refactors config tests into parametrized cases for defaults/overrides/corner cases. |
| test/ux/core/test_compliance.py | Introduces _deploy_and_run_compliance helper and consolidates several tests. |
| test/ux/core/test_basic.py | Consolidates basic flow tests + adds parametrized “custom endpoints” coverage. |
| test/ux/core/test_argo_compilation.py | Adds shared helpers and combines Argo compilation checks into a parametrized test. |
| test/ux/core/test_airflow_compilation.py | Replaces custom tempfile/env handling with fixtures and parametrized compilation tests. |
| test/ux/core/conftest.py | Minor formatting change in devstack env setup. |
| test/ux/conftest.py | Small formatting improvements and modernized string formatting. |
Comments suppressed due to low confidence (1)
test/ux/core/test_argo_compilation.py:50
test_argo_only_json_exposes_workflow_templateappears to have had its core assertions/body removed in this refactor, so it can pass without validating anything (when not skipped). Either delete this now-redundant test (sincetest_argo_compilation_behaviorscovers the same case), or restore the compilation + assertions inside it.
def test_argo_only_json_exposes_workflow_template(
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Greptile SummaryThis PR refactors 11 UX test files to consolidate repetitive standalone test functions into parametrized equivalents, extracting shared assertion callbacks and boilerplate helpers (
Confidence Score: 5/5Test-only refactoring; no production code changes. All assertions from the original tests are accounted for in the new parametrized forms. The refactoring correctly preserves test semantics across all files. Both findings are minor: an unused parameter in a private callback function, and a widened skip guard for nested-foreach that could mask a future runner-mode regression. Neither affects currently passing tests. test/ux/core/test_dag.py and test/ux/core/test_argo_compilation.py have minor issues but nothing blocking. Important Files Changed
Reviews (3): Last reviewed commit: "removed extra param" | Re-trigger Greptile |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3245 +/- ##
=========================================
Coverage ? 28.82%
=========================================
Files ? 381
Lines ? 52467
Branches ? 9260
=========================================
Hits ? 15126
Misses ? 36330
Partials ? 1011 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
PR Type
Summary