Skip to content

Commit 58fab44

Browse files
authored
tests: remove more duplicate test cases (#8943)
### Description Follow-up to #8896. Test-only cleanup removing byte-identical duplicate entries from parametrized case lists. No coverage is lost since each removed entry has an identical sibling that remains. Only genuine duplicates from the comment are removed. ### Changes - `tests/transforms/test_border_pad.py`: repeated 6-element `spatial_border` case - `tests/transforms/test_border_padd.py`: `spatial_border=2` case repeated twice - `tests/transforms/test_spatial_padd.py`: repeated `method="end"` case - `tests/transforms/test_center_spatial_crop.py`: repeated `roi_size=[2, 2, 2]` case - `tests/networks/nets/test_autoencoderkl.py`: duplicate `CASES_ATTENTION` entry - `tests/networks/nets/test_spade_autoencoderkl.py`: duplicate `CASES_ATTENTION` entry ### Types of changes - [x] Non-breaking change (test-only cleanup) - [x] All tests passing locally --------- Signed-off-by: Soumya Snigdha Kundu <soumya_snigdha.kundu@kcl.ac.uk>
1 parent 87ff41a commit 58fab44

6 files changed

Lines changed: 0 additions & 37 deletions

File tree

‎tests/networks/nets/test_autoencoderkl.py‎

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -99,21 +99,6 @@
9999
(1, 1, 16, 16),
100100
(1, 4, 4, 4),
101101
],
102-
[
103-
{
104-
"spatial_dims": 2,
105-
"in_channels": 1,
106-
"out_channels": 1,
107-
"channels": (4, 4, 4),
108-
"latent_channels": 4,
109-
"attention_levels": (False, False, False),
110-
"num_res_blocks": 1,
111-
"norm_num_groups": 4,
112-
},
113-
(1, 1, 16, 16),
114-
(1, 1, 16, 16),
115-
(1, 4, 4, 4),
116-
],
117102
[
118103
{
119104
"spatial_dims": 2,

‎tests/networks/nets/test_spade_autoencoderkl.py‎

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -99,23 +99,6 @@
9999
(1, 1, 16, 16),
100100
(1, 4, 4, 4),
101101
],
102-
[
103-
{
104-
"spatial_dims": 2,
105-
"label_nc": 3,
106-
"in_channels": 1,
107-
"out_channels": 1,
108-
"channels": (4, 4, 4),
109-
"latent_channels": 4,
110-
"attention_levels": (False, False, False),
111-
"num_res_blocks": 1,
112-
"norm_num_groups": 4,
113-
},
114-
(1, 1, 16, 16),
115-
(1, 3, 16, 16),
116-
(1, 1, 16, 16),
117-
(1, 4, 4, 4),
118-
],
119102
[
120103
{
121104
"spatial_dims": 2,

‎tests/transforms/test_border_pad.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
[{"spatial_border": 2}, (3, 8, 8, 4), (3, 12, 12, 8)],
2424
[{"spatial_border": [1, 2, 3]}, (3, 8, 8, 4), (3, 10, 12, 10)],
2525
[{"spatial_border": [1, 2, 3, 4, 5, 6]}, (3, 8, 8, 4), (3, 11, 15, 15)],
26-
[{"spatial_border": [1, 2, 3, 4, 5, 6]}, (3, 8, 8, 4), (3, 11, 15, 15)],
2726
]
2827

2928

‎tests/transforms/test_border_padd.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
[{"keys": "img", "spatial_border": 2}, (3, 8, 8, 4), (3, 12, 12, 8)],
2424
[{"keys": "img", "spatial_border": [1, 2, 3]}, (3, 8, 8, 4), (3, 10, 12, 10)],
2525
[{"keys": "img", "spatial_border": [1, 2, 3, 4, 5, 6]}, (3, 8, 8, 4), (3, 11, 15, 15)],
26-
[{"keys": "img", "spatial_border": 2}, (3, 8, 8, 4), (3, 12, 12, 8)],
27-
[{"keys": "img", "spatial_border": 2}, (3, 8, 8, 4), (3, 12, 12, 8)],
2826
]
2927

3028

‎tests/transforms/test_center_spatial_crop.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
TEST_SHAPES = [
2323
[{"roi_size": [2, 2, -1]}, (3, 3, 3, 3), (3, 2, 2, 3), True],
2424
[{"roi_size": [2, 2, 2]}, (3, 3, 3, 3), (3, 2, 2, 2), True],
25-
[{"roi_size": [2, 2, 2]}, (3, 3, 3, 3), (3, 2, 2, 2), True],
2625
[{"roi_size": [2, 1, 2]}, (3, 3, 3, 3), (3, 2, 1, 2), False],
2726
[{"roi_size": [2, 1, 3]}, (3, 3, 1, 3), (3, 2, 1, 3), True],
2827
]

‎tests/transforms/test_spatial_padd.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
TESTS = [
2222
[{"keys": ["img"], "spatial_size": [15, 8, 8], "method": "symmetric"}, (3, 8, 8, 5), (3, 15, 8, 8)],
2323
[{"keys": ["img"], "spatial_size": [15, 8, 8], "method": "end"}, (3, 8, 8, 5), (3, 15, 8, 8)],
24-
[{"keys": ["img"], "spatial_size": [15, 8, 8], "method": "end"}, (3, 8, 8, 5), (3, 15, 8, 8)],
2524
[{"keys": ["img"], "spatial_size": [15, 8, -1], "method": "end"}, (3, 8, 5, 4), (3, 15, 8, 4)],
2625
]
2726

0 commit comments

Comments
 (0)