14 lines
1.6 KiB
Plaintext
14 lines
1.6 KiB
Plaintext
# 124-dedup-test-collection: Dedup test collection
|
|
|
|
Goal: remove 3x test collection in followup fixes file
|
|
|
|
Steps:
|
|
1. Read follow-up note in done/121-followup-test-speedup.md.* (dynamic TestFollowupFixes adapter collects file 3x: 108 tests). 2. On a feature branch: remove duplicate collection keeping all unique tests + assertions (never weaken tests); run file until green. Done criteria: result notes list before/after test counts + pass count, or exact blocking failure.
|
|
|
|
Done criteria: result notes appended below; file moved to done/.
|
|
|
|
Result notes (append below before moving to done/):
|
|
|
|
Completed 2026-10-08T17:11:27Z via box tasks done:
|
|
DONE on branch builder/dedup-test-collection (uncommitted, test-only, zero production change). ROOT CAUSE of 3x: module-level test fns (36) + TestFollowupFixes unittest adapter (36) + loop-leftover _fn aliasing the adapter class, which pytest collects as a second TestCase (36) = 108. FIX (bin/tests/test_followup_fixes.py; tests/ file is a symlink to it): TestFollowupFixes.__test__=False so pytest skips the adapter, plus del _name,_fn after the adapter loop to drop the stray alias. Adapter KEPT (not deleted) because commit f2527f1 added it deliberately: unittest discover -s tests only sees TestCase classes, and repo docs gate on unittest discovery. Added 1 regression guard (test_collection_adapter_is_single_and_pytest_opted_out) pinning exactly-1-adapter + pytest opt-out; observed it FAIL 3x pre-fix, pass post-fix. No test weakened: all 36 original tests + assertions byte-identical. BEFORE/AFTER (pytest): 108 passed 0.17s -> 37 passed 0.13s. unittest discover: Ran 37 OK. Builtin runner: 37 PASS 0 FAIL.
|