tests: remove byte-identical duplicate test cases - #9051
Conversation
Signed-off-by: Soumya Snigdha Kundu <soumya_snigdha.kundu@kcl.ac.uk>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: Your plan includes up to 8 reviews per rolling hour; 7 remain after this review. 📝 WalkthroughWalkthroughThe changes remove duplicate or unused test cases from federated learning, inferer, spatial transform, and image-loading test modules. Removed cases are also deleted from their parameterized test collections. Remaining test coverage and test behavior are unchanged. Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This change only removes duplicate or dead test cases without altering production behavior; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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— dropTEST_CASE_2(=1),TEST_CASE_4(=3),TEST_CASE_7(=6),TEST_CASE_9(=8); the twotest_*_readerexpand lists lose thecorresponding slots (7 cases → 5 and 5 → 3).
tests/transforms/spatial/test_grid_patch.py/test_grid_patchd.py— drop theTEST_CASE_4that is byte-identical toTEST_CASE_3(offset (0, 0)), and its slot inthe per-backend
TEST_NDARRAYSexpansion.tests/transforms/spatial/test_rand_grid_patch.py/test_rand_grid_patchd.py— dropTEST_CASE_3, byte-identical toTEST_CASE_0(min/max_offset 0), and its slot.tests/fl/monai_algo/test_fl_monai_algo.py— dropTEST_TRAIN_3, byte-identical toTEST_TRAIN_1; the train expand list goes from 4 cases to 3 (one full FL trainround-trip no longer runs twice).
tests/inferers/test_patch_inferer.py—TEST_CASE_ERROR_10was byte-identical toTEST_CASE_ERROR_7and never referenced by any expand list (the error testsparametrize over
_0 .. _9only). 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):
Types of changes
./runtests.sh -f -u --net --coverage../runtests.sh --quick --unittests --disttests.make htmlcommand in thedocs/folder.