Skip to content

Revamp HS2P tests with deterministic mocked multires coverage#35

Merged
clemsgrs merged 8 commits intomainfrom
codex/test-revamped-suite
Feb 14, 2026
Merged

Revamp HS2P tests with deterministic mocked multires coverage#35
clemsgrs merged 8 commits intomainfrom
codex/test-revamped-suite

Conversation

@clemsgrs
Copy link
Owner

@clemsgrs clemsgrs commented Feb 7, 2026

Summary

  • add a fresh test-revamped/ suite focused on deterministic TDD for WSI tiling and sampling logic
  • keep legacy test/input/config.yaml and test/gt/test-wsi.npy untouched, but unused by revamped tests
  • point pytest discovery and PR CI to run test-revamped as the authoritative suite

New tests

Test file What it validates
test-revamped/test_sort_and_mask_utils.py Deterministic coordinate dedup/sort and exact mask-coverage fractions
test-revamped/test_level_selection.py Best-level selection (within tolerance + finer fallback) and spacing guard error path
test-revamped/test_mocked_multires_tiling.py Exact tile coordinates/counts on mocked rectangular tissue; threshold boundary (50% vs 51%); exact coordinate shifts across target spacings
test-revamped/test_mocked_sampling_filter.py Per-class coordinate filtering (tumor/stroma) on controlled label masks; discrete-label integrity after mask alignment/resizing
test-revamped/test_real_fixture_smoke_regression.py Real WSI+mask smoke checks for determinism, monotonicity under stricter tissue threshold, and metadata invariants

Verification

  • MPLCONFIGDIR=/tmp/mpl /Users/clems/Code/venv/hs2p/bin/python -m pytest -q test-revamped
  • result: 12 passed

@clemsgrs clemsgrs merged commit 024da6e into main Feb 14, 2026
1 check passed
@clemsgrs clemsgrs deleted the codex/test-revamped-suite branch February 14, 2026 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant