shahar1 opened a new pull request, #67694: URL: https://github.com/apache/airflow/pull/67694
Removes test code that was never executed, identified by: 1. Running `pytest --cov=airflow-core/tests/unit/ -m "not db_test"` and inspecting the JSON coverage report for callables with 0% body coverage. 2. Cross-referencing with `grep` to distinguish db-test-only code (legitimately 0% in the non-db run) from truly unreachable code. ## What was removed | File | Removed | |------|---------| | `test_import_error.py` | `permitted_dag_model` fixture — never used as a param anywhere | | `test_task_instances.py` | `one_task_with_single_mapped_ti` fixture — never used | | `cli/conftest.py` | `stream_capture`, `combined_capture` fixtures + `StreamCaptureManager`, `CombinedCaptureManager` imports | | `test_plugins_manager.py` | `mock_metadata_distribution` fixture + `import contextlib` | | `test_info_command.py` | `capture_show_output` helper + `from rich.console import Console` | | `test_task_command.py` | `move_back`, `_set_state_and_try_num` helpers + `import shutil`, `contextmanager` | | `assets/test_manager.py` | `create_mock_dag` generator + `import itertools` | | `task-sdk/test_taskgroup.py` | `test_taskgroup_getitem_returns_child_by_label` — superseded | ## Coverage improvement (sample) - `test_plugins_manager.py`: **94% → 99%** (body lines 61-71 removed) - `cli/conftest.py`: **74% → 85%** (body lines 88-102 removed) A follow-up PR will cover db-test dead code once the full-suite coverage run completes. --- ##### Was generative AI tooling used to co-author this PR? - [X] Yes — Claude Sonnet 4.6 (Claude Code) Generated-by: Claude Sonnet 4.6 (Claude Code) following [the guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
