You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit b3e9908
Browse filesBrowse the repository at this point in the historyBrowse files
tests: remove byte-identical duplicate test cases (#9051)
### Description
Test-suite cleanup: removes parametrized test cases that are
byte-identical duplicates of
another case in the same file, so each was silently running the same
test twice. Follows
the earlier byte-identical-entry pass (#8942) with a focus on duplicates
spread across
differently-named `TEST_CASE_*` variables that feed the same
`@parameterized.expand`.
Changes, per file (duplicate → surviving twin):
- `tests/transforms/test_load_image.py` — drop `TEST_CASE_2` (=1),
`TEST_CASE_4` (=3),
`TEST_CASE_7` (=6), `TEST_CASE_9` (=8); the two `test_*_reader` expand
lists lose the
corresponding slots (7 cases → 5 and 5 → 3).
- `tests/transforms/spatial/test_grid_patch.py` / `test_grid_patchd.py`
— drop the
`TEST_CASE_4` that is byte-identical to `TEST_CASE_3` (`offset (0, 0)`),
and its slot in
the per-backend `TEST_NDARRAYS` expansion.
- `tests/transforms/spatial/test_rand_grid_patch.py` /
`test_rand_grid_patchd.py` — drop
`TEST_CASE_3`, byte-identical to `TEST_CASE_0` (`min/max_offset 0`), and
its slot.
- `tests/fl/monai_algo/test_fl_monai_algo.py` — drop `TEST_TRAIN_3`,
byte-identical to
`TEST_TRAIN_1`; the train expand list goes from 4 cases to 3 (one full
FL train
round-trip no longer runs twice).
- `tests/inferers/test_patch_inferer.py` — `TEST_CASE_ERROR_10` was
byte-identical to
`TEST_CASE_ERROR_7` **and** never referenced by any expand list (the
error tests
parametrize over `_0 .. _9` only). Dead code; removed.
Test-only change: no production code touched, no behaviour altered —
each removed case
re-ran an identical parametrization. Collected test counts before →
after (identical
cases removed, coverage unchanged):
| file | cases before | after |
|---|---|---|
| test_load_image.py | 51 | 47 |
| grid_patch | 70 | 66 |
| grid_patchd | 68 | 64 |
| rand_grid_patch | 58 | 54 |
| rand_grid_patchd | 56 | 52 |
| fl_monai_algo | 10 | 9 |
| patch_inferer | 46 | 46 (dead code only) |
### Types of changes
<!--- Put an `x` in all the boxes that apply, and remove the not
applicable items -->
- [x] Non-breaking change (fix or new feature that would not break
existing functionality).
- [ ] Breaking change (fix or new feature that would cause existing
functionality to change).
- [ ] New tests added to cover the changes.
- [ ] Integration tests passed locally by running `./runtests.sh -f -u
--net --coverage`.
- [ ] Quick tests passed locally by running `./runtests.sh --quick
--unittests --disttests`.
- [ ] In-line docstrings updated.
- [ ] Documentation updated, tested `make html` command in the `docs/`
folder.
Signed-off-by: Soumya Snigdha Kundu <soumya_snigdha.kundu@kcl.ac.uk>
Co-authored-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com>
0 commit comments