Skip to content

Remove redundant tests from Task SDK#68504

Open
shahar1 wants to merge 1 commit into
apache:mainfrom
shahar1:remove-redundant-task-sdk-tests
Open

Remove redundant tests from Task SDK#68504
shahar1 wants to merge 1 commit into
apache:mainfrom
shahar1:remove-redundant-task-sdk-tests

Conversation

@shahar1

@shahar1 shahar1 commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Human Summary

related: #68502.
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

Legend — patterns:

  • P1 Stdlib / third-party behavior tested directly (trust the library)
  • P2 Trivial attribute round-trip (no logic, just obj.field == value_just_passed_in)
  • P5 Exact or near-exact duplicate function
Test File : line Pattern Why redundant
test_build_task_group_with_prefix_functionality test_taskgroup.py:275 P5 Near-exact duplicate of test_build_task_group_with_prefix: same Dag structure, same 7 assertions, only the Dag name string and inline comments differ
test_mask_secret_with_iterable test_comms.py:68 P5 Literal duplicate of test_mask_secret_with_list: identical setup example_dict = ["test"] and identical assertion — claims to test an iterable but uses the same list
test_mask_secret_with_list test_comms.py:63 P5 Fully subsumed by the parametrized test_mask_secret_with_objects, which already covers a list input alongside dict and string cases
test_node_not_found_caught_as_key_error test_exceptions.py:32 P1 Redundant with test_node_not_found_is_subclass_of_key_error; if the class hierarchy is correct the catch is guaranteed by Python — tests except mechanics, not our code
test_node_not_found_caught_as_task_not_found test_exceptions.py:37 P1 Redundant with test_node_not_found_is_subclass_of_task_not_found; tests Python's exception dispatch, not the exception class definition
test_eq (WaitForAll) test_wait_policy.py:28 P1 WaitForAll is a plain attrs class with no custom __eq__; WaitForAll() == WaitForAll() tests attrs-generated equality, not project logic
test_hash_consistent (WaitForAll) test_wait_policy.py:34 P1 hash(WaitForAll()) == hash(WaitForAll()) tests attrs-generated __hash__, not project logic
test_repr (WaitForAll) test_wait_policy.py:23 P1 repr(WaitForAll()) == "WaitForAll()" tests attrs-generated __repr__ with no custom repr logic
test_stores_n (MinimumCount) test_wait_policy.py:39 P2 MinimumCount(5).n == 5 — pure attribute round-trip on an attrs field, no computed value or transformation
test_eq_same_n (MinimumCount) test_wait_policy.py:42 P1 MinimumCount(5) == MinimumCount(5) — attrs-generated value equality, not project logic
test_hash_consistent (MinimumCount) test_wait_policy.py:51 P1 hash(MinimumCount(5)) == hash(MinimumCount(5)) — attrs-generated __hash__, not project logic
test_repr (MinimumCount) test_wait_policy.py:48 P1 repr(MinimumCount(5)) == "MinimumCount(n=5)" — attrs-generated repr, no custom logic
test_explicit_values test_asset_access_control.py:31 P2 Constructs AssetAccessControl(...) and asserts each field equals what was passed in — pure round-trip, no transformation or validation exercised
TestTaskGroupGetItem::test_getitem_missing_is_key_error test_taskgroup.py P1 NodeNotFound subclasses KeyError, so the sibling raises(NodeNotFound) already guarantees the raises(KeyError) catch — re-states a fact Python's class hierarchy enforces
TestDagGetItem::test_getitem_missing_is_key_error test_dag.py P1 Same as above for Dag.__getitem__
test_override_dag_default_args test_taskgroup.py P5 Byte-identical body to test_default_args (same Dag, same TaskGroup default_args, same three owner assertions); only the name and docstring differ

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

@shahar1 shahar1 requested a review from jscheffl June 13, 2026 12:35
@eladkal eladkal added this to the Airflow 3.3.0 milestone Jun 15, 2026
@eladkal eladkal added the changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..) label Jun 15, 2026
@shahar1 shahar1 requested a review from eladkal June 17, 2026 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:task-sdk changelog:skip Changes that should be skipped from the changelog (CI, tests, etc..)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants