Skip to content

Remove redundant tests from airflow-core#68513

Merged
shahar1 merged 1 commit into
apache:mainfrom
shahar1:remove-redundant-airflow-core-tests
Jun 13, 2026
Merged

Remove redundant tests from airflow-core#68513
shahar1 merged 1 commit into
apache:mainfrom
shahar1:remove-redundant-airflow-core-tests

Conversation

@shahar1

@shahar1 shahar1 commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Human Summary

related: #68502, #68507

This PR removes tests that are either stdlib/3rd-party's concern, trivial attribute round-trip, or duplicated tests.

Summarizing table is in the "AI Summary".

AI Summary

Click Here

Candidates were surfaced by two detectors — per-test coverage signatures and an AST scan of the whole test tree (cross-file duplicates + dunder/stdlib + round-trip patterns) — and every one was confirmed by reading the test body, its decorators, and the production code before deletion.

Legend — patterns:

  • P1 Stdlib / third-party behavior tested directly
  • P2 Trivial attribute round-trip
  • P5 Exact or near-exact duplicate function
Test File : line Pattern Why redundant
test_state_generic airflow-core/tests/unit/executors/test_base_executor.py:448 P5 Byte-identical body to test_state_queued (same BaseExecutor.queued() call and the two assertions on running/event_buffer); only the name differs. Kept test_state_queued.
test_empty_string_falls_back_to_default airflow-core/tests/unit/logging/test_logging_config.py:60 P5 Fully subsumed by test_falsy_logging_class_path_falls_back_to_default, which is @parametrized over ["", None] and already exercises the empty-string case with the identical assertion.
TestCallbackSupport::test_local_executor_supports_callbacks_true airflow-core/tests/unit/executors/test_base_executor.py:642 P5 Byte-identical, cross-file duplicate of test_local_executor.py::TestLocalExecutorCallbackSupport::test_supports_callbacks_flag_is_true (LocalExecutor(); assert supports_callbacks is True). LocalExecutor's flag belongs in test_local_executor.py; kept that copy.
test_base_job_respects_plugin_hooks airflow-core/tests/unit/jobs/test_base_job.py:59 P5 Byte-identical to test_state_sysexit (runs sys.exit(0), asserts SUCCESS) — tests nothing about plugin hooks despite its name. Real plugin coverage is the separate test_base_job_respects_plugin_lifecycle.
test_run_command_with_mode_standard airflow-core/tests/unit/cli/commands/test_kerberos_command.py:124 P5 Byte-identical to test_run_command — neither passes --mode, both assert the STANDARD default. Adds no coverage beyond test_run_command.
TestRepr::test_wait_for_all_repr airflow-core/tests/unit/partition_mappers/test_rollup_wait_policy.py:109 P1 Asserts repr(WaitForAll()) == "WaitForAll()"WaitForAll is @attrs.define(frozen=True) with no custom __repr__; this tests attrs' generated repr.
TestRepr::test_minimum_count_repr airflow-core/tests/unit/partition_mappers/test_rollup_wait_policy.py:112 P1 Asserts repr(MinimumCount(5)) == "MinimumCount(n=5)" — attrs-generated repr, no custom __repr__ on the class.
TestPolicyConstruction::test_wait_for_all_is_stateless airflow-core/tests/unit/partition_mappers/test_rollup_wait_policy.py:53 P1 Asserts WaitForAll() == WaitForAll() and equal hashes — @attrs.define(frozen=True) auto-generates __eq__/__hash__ for the field-less class; tests attrs, not airflow logic.

Was generative AI tooling used to co-author this PR?
  • Yes — Claude Code (Opus 4.8)

Generated-by: Claude Code (Opus 4.8) following the guidelines

Surfaced by two detectors (per-test coverage signatures + an AST whole-tree
scan) and confirmed by reading each body, its decorators and the production code.

Exact / near-exact duplicates (P5):
- test_base_executor.py::test_state_generic — byte-identical to test_state_queued.
- test_base_executor.py::TestCallbackSupport::test_local_executor_supports_callbacks_true
  — cross-file dup of test_local_executor.py's TestLocalExecutorCallbackSupport;
  LocalExecutor's flag belongs there.
- test_base_job.py::test_base_job_respects_plugin_hooks — byte-identical to
  test_state_sysexit; tests nothing about plugin hooks (real coverage is
  test_base_job_respects_plugin_lifecycle).
- test_kerberos_command.py::test_run_command_with_mode_standard — byte-identical
  to test_run_command; both assert the STANDARD default.
- test_logging_config.py::test_empty_string_falls_back_to_default — subsumed by
  test_falsy_logging_class_path_falls_back_to_default, parametrized over ['', None].

Library-behaviour tests (P1) — attrs-generated dunders, no custom logic:
- test_rollup_wait_policy.py::TestRepr (both repr tests) and
  test_wait_for_all_is_stateless exercise @attrs.define(frozen=True) __repr__/__eq__/
  __hash__ on WaitForAll/MinimumCount, which define no custom dunders.
@boring-cyborg boring-cyborg Bot added area:CLI area:Executors-core LocalExecutor & SequentialExecutor labels Jun 13, 2026
@shahar1 shahar1 requested a review from jscheffl June 13, 2026 19:32
@shahar1 shahar1 merged commit b935b90 into apache:main Jun 13, 2026
76 checks passed
@shahar1 shahar1 changed the title Remove redundant tests from Airflow-core Remove redundant tests from airflow-core Jun 13, 2026
pgagnon pushed a commit to pgagnon/airflow that referenced this pull request Jun 15, 2026
imrichardwu pushed a commit to imrichardwu/airflow that referenced this pull request Jun 16, 2026
dingo4dev pushed a commit to dingo4dev/airflow that referenced this pull request Jun 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:CLI area:Executors-core LocalExecutor & SequentialExecutor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants