Slice 7: Clean up test organization drift #43

Closed
opened 2026-06-05 18:11:37 +02:00 by AlexKucera · 1 comment
AlexKucera commented 2026-06-05 18:11:37 +02:00 (Migrated from github.com)

Parent

#36 — PRD-003: Deepen Codebase Architecture

What to build

Reorganize three test-organization problems into a single cleanup pass:

  1. Move path-related tests from test_downloader.py to test_path.py — tests that exercise sanitize(), resolve_path(), needs_subdirectory(), resolve_output_plan() (imported from path.py but tested inside downloader tests)
  2. Move integration-style tests from test_progress.py to test_sync_run.py — TestFailureIsolationCLI and TestFatalVsBookLevel which patch sync_run internals
  3. Delete duplicated TestParallelProgressCallbackWiring (appears twice verbatim in test_progress.py)

All changes are move-only or delete — no logic changes.

Acceptance criteria

  • Tests for path.py functions (sanitize, resolve_path, needs_subdirectory, resolve_output_plan) live in test_path.py, not test_downloader.py
  • Integration-style pipeline tests live in test_sync_run.py, not test_progress.py
  • No duplicated test classes remain in any test file
  • Full test suite passes with same total test count (no tests lost or gained)
  • Each test file tests exactly one production module

Blocked by

None - can start immediately (prefer Slices 5+6 done first so source code has settled)

## Parent #36 — PRD-003: Deepen Codebase Architecture ## What to build Reorganize three test-organization problems into a single cleanup pass: 1. **Move path-related tests** from `test_downloader.py` to `test_path.py` — tests that exercise sanitize(), resolve_path(), needs_subdirectory(), resolve_output_plan() (imported from path.py but tested inside downloader tests) 2. **Move integration-style tests** from `test_progress.py` to `test_sync_run.py` — TestFailureIsolationCLI and TestFatalVsBookLevel which patch sync_run internals 3. **Delete duplicated** TestParallelProgressCallbackWiring (appears twice verbatim in test_progress.py) All changes are move-only or delete — no logic changes. ## Acceptance criteria - [ ] Tests for path.py functions (sanitize, resolve_path, needs_subdirectory, resolve_output_plan) live in `test_path.py`, not `test_downloader.py` - [ ] Integration-style pipeline tests live in `test_sync_run.py`, not `test_progress.py` - [ ] No duplicated test classes remain in any test file - [ ] Full test suite passes with same total test count (no tests lost or gained) - [ ] Each test file tests exactly one production module ## Blocked by None - can start immediately (prefer Slices 5+6 done first so source code has settled)
AlexKucera commented 2026-06-05 19:49:01 +02:00 (Migrated from github.com)

Closed via a66c98d — all 5 acceptance criteria met. See session log for details.

Closed via a66c98d — all 5 acceptance criteria met. See [session log](docs/devlog/20260605-issue43-test-reorganization-cleanup-pass_log.md) for details.
Sign in to join this conversation.