Skip to content

Commit af9e8f9

Browse files
garciadiaspre-commit-ci[bot]Rafael Garcia-DiasKumoLiuericspod
authored
8185 - Refactor test (#8231)
Fixes #8185 ### Description ## Reorganize tests I have looked at the imports in each test file and the test title to identify which files were being tested. I mirrored the file structure of MONAI on the `tests` folder and moved the files accordingly. I used some helper scripts, but the process required substantial manual intervention. When uncertain, I moved the tests to the `integration` folder since the confusion always involved many imports, and I could not find clarity from the test name. Please review the integration folder carefully, which is the one that I feel the least confident about. ``` ### 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). - [x] Quick tests passed locally by running `./runtests.sh --quick --unittests --disttests`. --------- Signed-off-by: YunLiu <[email protected]> Signed-off-by: R. Garcia-Dias <[email protected]> Signed-off-by: Rafael Garcia-Dias <[email protected]> Signed-off-by: Eric Kerfoot <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Rafael Garcia-Dias <[email protected]> Co-authored-by: YunLiu <[email protected]> Co-authored-by: Eric Kerfoot <[email protected]>
1 parent aa5bd06 commit af9e8f9

File tree

840 files changed

+856
-795
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

840 files changed

+856
-795
lines changed

monai/transforms/io/array.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"""
1212
A collection of "vanilla" transforms for IO functions.
1313
"""
14-
1514
from __future__ import annotations
1615

1716
import inspect

runtests.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ if [ $doDistTests = true ]
728728
then
729729
echo "${separator}${blue}run distributed unit test cases${noColor}"
730730
torch_validate
731-
for i in tests/test_*_dist.py
731+
for i in $(find ./tests/ -name "*_dist.py")
732732
do
733733
echo "$i"
734734
${cmdPrefix}${cmd} "$i"
@@ -740,7 +740,7 @@ if [ $doNetTests = true ]
740740
then
741741
set +e # disable exit on failure so that diagnostics can be given on failure
742742
echo "${separator}${blue}integration${noColor}"
743-
for i in tests/*integration_*.py
743+
for i in tests/integration/*.py
744744
do
745745
echo "$i"
746746
${cmdPrefix}${cmd} "$i"

tests/apps/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright (c) MONAI Consortium
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
# Unless required by applicable law or agreed to in writing, software
7+
# distributed under the License is distributed on an "AS IS" BASIS,
8+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
# See the License for the specific language governing permissions and
10+
# limitations under the License.

tests/apps/deepedit/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright (c) MONAI Consortium
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
# Unless required by applicable law or agreed to in writing, software
7+
# distributed under the License is distributed on an "AS IS" BASIS,
8+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
# See the License for the specific language governing permissions and
10+
# limitations under the License.

tests/apps/deepgrow/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright (c) MONAI Consortium
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
# Unless required by applicable law or agreed to in writing, software
7+
# distributed under the License is distributed on an "AS IS" BASIS,
8+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
# See the License for the specific language governing permissions and
10+
# limitations under the License.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright (c) MONAI Consortium
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
# Unless required by applicable law or agreed to in writing, software
7+
# distributed under the License is distributed on an "AS IS" BASIS,
8+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
# See the License for the specific language governing permissions and
10+
# limitations under the License.

tests/apps/detection/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright (c) MONAI Consortium
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
# Unless required by applicable law or agreed to in writing, software
7+
# distributed under the License is distributed on an "AS IS" BASIS,
8+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
# See the License for the specific language governing permissions and
10+
# limitations under the License.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright (c) MONAI Consortium
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
# Unless required by applicable law or agreed to in writing, software
7+
# distributed under the License is distributed on an "AS IS" BASIS,
8+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
# See the License for the specific language governing permissions and
10+
# limitations under the License.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright (c) MONAI Consortium
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
# Unless required by applicable law or agreed to in writing, software
7+
# distributed under the License is distributed on an "AS IS" BASIS,
8+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
# See the License for the specific language governing permissions and
10+
# limitations under the License.

tests/test_retinanet.py renamed to tests/apps/detection/networks/test_retinanet.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@
101101
@unittest.skipUnless(has_torchvision, "Requires torchvision")
102102
@skip_if_quick
103103
class TestRetinaNet(unittest.TestCase):
104-
105104
@parameterized.expand(TEST_CASES)
106105
def test_retina_shape(self, model, input_param, input_shape):
107106
backbone = model(**input_param)

tests/test_retinanet_detector.py renamed to tests/apps/detection/networks/test_retinanet_detector.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@
9393

9494

9595
class NaiveNetwork(torch.nn.Module):
96-
9796
def __init__(self, spatial_dims, num_classes, **kwargs):
9897
super().__init__()
9998
self.spatial_dims = spatial_dims
@@ -115,7 +114,6 @@ def forward(self, images):
115114
@unittest.skipUnless(has_torchvision, "Requires torchvision")
116115
@skip_if_quick
117116
class TestRetinaNetDetector(unittest.TestCase):
118-
119117
@parameterized.expand(TEST_CASES)
120118
def test_retina_detector_resnet_backbone_shape(self, input_param, input_shape):
121119
returned_layers = [1]

tests/test_box_transform.py renamed to tests/apps/detection/test_box_transform.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@
7979

8080

8181
class TestBoxTransform(unittest.TestCase):
82-
8382
@parameterized.expand(TESTS_2D_mask)
8483
def test_value_2d_mask(self, mask, expected_box_label):
8584
box_label = convert_mask_to_box(mask)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright (c) MONAI Consortium
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
# Unless required by applicable law or agreed to in writing, software
7+
# distributed under the License is distributed on an "AS IS" BASIS,
8+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
# See the License for the specific language governing permissions and
10+
# limitations under the License.

tests/test_anchor_box.py renamed to tests/apps/detection/utils/test_anchor_box.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242
@SkipIfBeforePyTorchVersion((1, 11))
4343
@unittest.skipUnless(has_torchvision, "Requires torchvision")
4444
class TestAnchorGenerator(unittest.TestCase):
45-
4645
@parameterized.expand(TEST_CASES_2D)
4746
def test_anchor_2d(self, input_param, image_shape, feature_maps_shapes):
4847
torch_anchor_utils, _ = optional_import("torchvision.models.detection.anchor_utils")

tests/test_atss_box_matcher.py renamed to tests/apps/detection/utils/test_atss_box_matcher.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333

3434

3535
class TestATSS(unittest.TestCase):
36-
3736
@parameterized.expand(TEST_CASES)
3837
def test_atss(self, input_param, boxes, anchors, num_anchors_per_level, num_anchors_per_loc, expected_matches):
3938
matcher = ATSSMatcher(**input_param, debug=True)

tests/test_box_coder.py renamed to tests/apps/detection/utils/test_box_coder.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121

2222

2323
class TestBoxTransform(unittest.TestCase):
24-
2524
def test_value(self):
2625
box_coder = BoxCoder(weights=[1, 1, 1, 1, 1, 1])
2726
test_dtype = [torch.float32, torch.float16]

tests/test_detector_boxselector.py renamed to tests/apps/detection/utils/test_detector_boxselector.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656

5757

5858
class TestBoxSelector(unittest.TestCase):
59-
6059
@parameterized.expand(TEST_CASE)
6160
def test_box_selector(self, input_param, boxes, logits, image_shape, expected_results):
6261
box_selector = BoxSelector(**input_param)

tests/test_detector_utils.py renamed to tests/apps/detection/utils/test_detector_utils.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@
7979

8080

8181
class TestDetectorUtils(unittest.TestCase):
82-
8382
@parameterized.expand(TEST_CASES)
8483
def test_detector_utils(self, input_param, input_shape, expected_shape):
8584
size_divisible = 32 * ensure_tuple(input_param["conv1_t_stride"])[0]

tests/test_hardnegsampler.py renamed to tests/apps/detection/utils/test_hardnegsampler.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737

3838

3939
class TestSampleSlices(unittest.TestCase):
40-
4140
@parameterized.expand(TEST_CASE)
4241
def test_shape(self, target_label0, target_label1, concat_fg_probs, expected_result_pos, expected_result_neg):
4342
compute_dtypes = [torch.float16, torch.float32]

tests/apps/maisi/networks/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright (c) MONAI Consortium
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
# Unless required by applicable law or agreed to in writing, software
7+
# distributed under the License is distributed on an "AS IS" BASIS,
8+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
# See the License for the specific language governing permissions and
10+
# limitations under the License.

tests/test_autoencoderkl_maisi.py renamed to tests/apps/maisi/networks/test_autoencoderkl_maisi.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@
7777

7878

7979
class TestAutoencoderKlMaisi(unittest.TestCase):
80-
8180
@parameterized.expand(CASES)
8281
def test_shape(self, input_param, input_shape, expected_shape, expected_latent_shape):
8382
net = AutoencoderKlMaisi(**input_param).to(device)

tests/test_controlnet_maisi.py renamed to tests/apps/maisi/networks/test_controlnet_maisi.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@
129129

130130
@SkipIfBeforePyTorchVersion((2, 0))
131131
class TestControlNet(unittest.TestCase):
132-
133132
@parameterized.expand(TEST_CASES)
134133
@skipUnless(has_einops, "Requires einops")
135134
def test_shape_unconditioned_models(self, input_param, expected_num_down_blocks_residuals, expected_shape):

tests/apps/nuclick/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright (c) MONAI Consortium
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
# Unless required by applicable law or agreed to in writing, software
7+
# distributed under the License is distributed on an "AS IS" BASIS,
8+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
# See the License for the specific language governing permissions and
10+
# limitations under the License.

tests/apps/pathology/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright (c) MONAI Consortium
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
# Unless required by applicable law or agreed to in writing, software
7+
# distributed under the License is distributed on an "AS IS" BASIS,
8+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
# See the License for the specific language governing permissions and
10+
# limitations under the License.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright (c) MONAI Consortium
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
# Unless required by applicable law or agreed to in writing, software
7+
# distributed under the License is distributed on an "AS IS" BASIS,
8+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
# See the License for the specific language governing permissions and
10+
# limitations under the License.

tests/test_from_engine_hovernet.py renamed to tests/apps/pathology/handlers/test_from_engine_hovernet.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828

2929

3030
class TestFromEngineHovernet(unittest.TestCase):
31-
3231
@parameterized.expand(CASES)
3332
def test_results(self, input, expected):
3433
output = from_engine_hovernet(keys=["A", "B"], nested_key="C")(input)
File renamed without changes.

tests/test_prepare_batch_hovernet.py renamed to tests/apps/pathology/test_prepare_batch_hovernet.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ def forward(self, x: torch.Tensor):
3535

3636

3737
class TestPrepareBatchHoVerNet(unittest.TestCase):
38-
3938
@parameterized.expand([TEST_CASE_0])
4039
def test_content(self, input_args, expected_value):
4140
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

tests/test_sliding_window_hovernet_inference.py renamed to tests/apps/pathology/test_sliding_window_hovernet_inference.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from monai.data import MetaTensor
2222
from monai.inferers import sliding_window_inference
2323
from monai.utils import optional_import
24-
from tests.test_sliding_window_inference import TEST_CASES
24+
from tests.inferers.test_sliding_window_inference import TEST_CASES
2525

2626
_, has_tqdm = optional_import("tqdm")
2727

@@ -36,7 +36,6 @@
3636

3737

3838
class TestSlidingWindowHoVerNetInference(unittest.TestCase):
39-
4039
@parameterized.expand(TEST_CASES_PADDING)
4140
def test_sliding_window_with_padding(
4241
self, key, image_shape, roi_shape, sw_batch_size, overlap, mode, device, extra_input_padding
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright (c) MONAI Consortium
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
# Unless required by applicable law or agreed to in writing, software
7+
# distributed under the License is distributed on an "AS IS" BASIS,
8+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
# See the License for the specific language governing permissions and
10+
# limitations under the License.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright (c) MONAI Consortium
2+
# Licensed under the Apache License, Version 2.0 (the "License");
3+
# you may not use this file except in compliance with the License.
4+
# You may obtain a copy of the License at
5+
# http://www.apache.org/licenses/LICENSE-2.0
6+
# Unless required by applicable law or agreed to in writing, software
7+
# distributed under the License is distributed on an "AS IS" BASIS,
8+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
# See the License for the specific language governing permissions and
10+
# limitations under the License.

tests/test_generate_distance_map.py renamed to tests/apps/pathology/transforms/post/test_generate_distance_map.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636

3737

3838
class TestGenerateDistanceMap(unittest.TestCase):
39-
4039
@parameterized.expand(EXCEPTION_TESTS)
4140
def test_value(self, arguments, mask, probmap, exception_type):
4241
with self.assertRaises(exception_type):

tests/test_generate_distance_mapd.py renamed to tests/apps/pathology/transforms/post/test_generate_distance_mapd.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@
5555

5656

5757
class TestGenerateDistanceMapd(unittest.TestCase):
58-
5958
@parameterized.expand(EXCEPTION_TESTS)
6059
def test_value(self, arguments, mask, border_map, exception_type):
6160
with self.assertRaises(exception_type):

tests/test_generate_instance_border.py renamed to tests/apps/pathology/transforms/post/test_generate_instance_border.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@
3434

3535

3636
class TestGenerateInstanceBorder(unittest.TestCase):
37-
3837
@parameterized.expand(EXCEPTION_TESTS)
3938
def test_value(self, arguments, mask, hover_map, exception_type):
4039
with self.assertRaises(exception_type):

tests/test_generate_instance_borderd.py renamed to tests/apps/pathology/transforms/post/test_generate_instance_borderd.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444

4545

4646
class TestGenerateInstanceBorderd(unittest.TestCase):
47-
4847
@parameterized.expand(EXCEPTION_TESTS)
4948
def test_value(self, arguments, mask, hover_map, exception_type):
5049
with self.assertRaises(exception_type):

tests/test_generate_instance_centroid.py renamed to tests/apps/pathology/transforms/post/test_generate_instance_centroid.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141

4242
@unittest.skipUnless(has_skimage, "Requires scikit-image library.")
4343
class TestGenerateInstanceCentroid(unittest.TestCase):
44-
4544
@parameterized.expand(TEST_CASE)
4645
def test_shape(self, in_type, test_data, offset, expected):
4746
inst_bbox = get_bbox(test_data[None])

tests/test_generate_instance_centroidd.py renamed to tests/apps/pathology/transforms/post/test_generate_instance_centroidd.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141

4242
@unittest.skipUnless(has_skimage, "Requires scikit-image library.")
4343
class TestGenerateInstanceCentroidd(unittest.TestCase):
44-
4544
@parameterized.expand(TEST_CASE)
4645
def test_shape(self, in_type, test_data, offset, expected):
4746
inst_bbox = get_bbox(test_data[None])

tests/test_generate_instance_contour.py renamed to tests/apps/pathology/transforms/post/test_generate_instance_contour.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646

4747
@unittest.skipUnless(has_skimage, "Requires scikit-image library.")
4848
class TestGenerateInstanceContour(unittest.TestCase):
49-
5049
@parameterized.expand(TEST_CASE)
5150
def test_shape(self, in_type, test_data, min_num_points, offset, expected):
5251
inst_bbox = get_bbox(test_data[None])

tests/test_generate_instance_contourd.py renamed to tests/apps/pathology/transforms/post/test_generate_instance_contourd.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646

4747
@unittest.skipUnless(has_skimage, "Requires scikit-image library.")
4848
class TestGenerateInstanceContourd(unittest.TestCase):
49-
5049
@parameterized.expand(TEST_CASE)
5150
def test_shape(self, in_type, test_data, min_num_points, offset, expected):
5251
inst_bbox = get_bbox(test_data[None])

tests/test_generate_instance_type.py renamed to tests/apps/pathology/transforms/post/test_generate_instance_type.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141

4242

4343
class TestGenerateInstanceType(unittest.TestCase):
44-
4544
@parameterized.expand(TEST_CASE)
4645
def test_shape(self, in_type, type_pred, seg_pred, bbox, expected):
4746
result = GenerateInstanceType()(in_type(type_pred[None]), in_type(seg_pred[None]), bbox, 1)

tests/test_generate_instance_typed.py renamed to tests/apps/pathology/transforms/post/test_generate_instance_typed.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141

4242

4343
class TestGenerateInstanceTyped(unittest.TestCase):
44-
4544
@parameterized.expand(TEST_CASE)
4645
def test_shape(self, in_type, type_pred, seg_pred, bbox, expected):
4746
test_data = {"type_pred": in_type(type_pred[None]), "seg": in_type(seg_pred[None]), "bbox": bbox, "id": 1}

tests/test_generate_watershed_markers.py renamed to tests/apps/pathology/transforms/post/test_generate_watershed_markers.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
@unittest.skipUnless(has_skimage, "Requires scikit-image library.")
3939
@unittest.skipUnless(has_scipy, "Requires scipy library.")
4040
class TestGenerateWatershedMarkers(unittest.TestCase):
41-
4241
@parameterized.expand(EXCEPTION_TESTS)
4342
def test_value(self, arguments, mask, probmap, exception_type):
4443
with self.assertRaises(exception_type):

0 commit comments

Comments
 (0)