Skip to content

Commit aa5bd06

Browse files
authored
Changing utils.py to test_utils.py (#8335)
Related to #8185. ### Description This changes the name of `tests/utils.py` to `tests/test_utils.py` to conform to the changes introduced with the daily CICD tests. This is done in #8231 but the change is being pre-merged now to get tests working again while issues are sorted out there. This also includes changes this PR made to that file, and changes anywhere else to correctly import the module. ### 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: Eric Kerfoot <[email protected]>
1 parent 8dcb9dc commit aa5bd06

File tree

529 files changed

+556
-529
lines changed

Some content is hidden

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

529 files changed

+556
-529
lines changed

tests/croppers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from monai.transforms import Randomizable
2121
from monai.transforms.lazy.functional import apply_pending
2222
from monai.transforms.transform import MapTransform
23-
from tests.utils import TEST_NDARRAYS_ALL, assert_allclose
23+
from tests.test_utils import TEST_NDARRAYS_ALL, assert_allclose
2424

2525

2626
class CropTest(unittest.TestCase):

tests/hvd_evenly_divisible_all_gather.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
from monai.utils import evenly_divisible_all_gather
1717
from monai.utils.module import optional_import
18-
from tests.utils import assert_allclose
18+
from tests.test_utils import assert_allclose
1919

2020
hvd, has_hvd = optional_import("horovod", name="torch")
2121

tests/lazy_transforms_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from monai.data import MetaTensor, set_track_meta
1717
from monai.transforms import InvertibleTransform, MapTransform, Randomizable
1818
from monai.transforms.lazy.functional import apply_pending
19-
from tests.utils import assert_allclose
19+
from tests.test_utils import assert_allclose
2020

2121
apply_transforms_kwargs = ("pending", "mode", "padding_mode", "dtype", "align_corners")
2222

tests/ngc_bundle_download.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from monai.bundle import download, load
2525
from monai.config import print_debug_info
2626
from monai.networks.utils import copy_model_state
27-
from tests.utils import assert_allclose, skip_if_downloading_fails, skip_if_quick, skip_if_windows
27+
from tests.test_utils import assert_allclose, skip_if_downloading_fails, skip_if_quick, skip_if_windows
2828

2929
TEST_CASE_NGC_1 = [
3030
"spleen_ct_segmentation",

tests/padders.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
from monai.transforms.lazy.functional import apply_pending
2222
from monai.transforms.transform import MapTransform
2323
from monai.utils.enums import NumpyPadMode, PytorchPadMode
24-
from tests.utils import TEST_NDARRAYS_ALL, assert_allclose
24+
from tests.test_utils import TEST_NDARRAYS_ALL, assert_allclose
2525

2626
MODES = []
2727
# Test modes

tests/test_activations.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
from monai.networks.layers.factories import Act
2020
from monai.transforms import Activations
21-
from tests.utils import TEST_NDARRAYS, assert_allclose
21+
from tests.test_utils import TEST_NDARRAYS, assert_allclose
2222

2323
TEST_CASES = []
2424
for p in TEST_NDARRAYS:

tests/test_activationsd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from parameterized import parameterized
1818

1919
from monai.transforms import Activationsd
20-
from tests.utils import TEST_NDARRAYS, assert_allclose
20+
from tests.test_utils import TEST_NDARRAYS, assert_allclose
2121

2222
TEST_CASES = []
2323
for p in TEST_NDARRAYS:

tests/test_add_coordinate_channels.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from parameterized import parameterized
1919

2020
from monai.transforms import AddCoordinateChannels
21-
from tests.utils import TEST_NDARRAYS, assert_allclose
21+
from tests.test_utils import TEST_NDARRAYS, assert_allclose
2222

2323
TESTS, TEST_CASES_ERROR_1, TEST_CASES_ERROR_2 = [], [], []
2424
for p in TEST_NDARRAYS:

tests/test_add_coordinate_channelsd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from parameterized import parameterized
1919

2020
from monai.transforms import AddCoordinateChannelsd
21-
from tests.utils import TEST_NDARRAYS, assert_allclose
21+
from tests.test_utils import TEST_NDARRAYS, assert_allclose
2222

2323
TESTS, TEST_CASES_ERROR_1, TEST_CASES_ERROR_2 = [], [], []
2424
for p in TEST_NDARRAYS:

tests/test_add_extreme_points_channel.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from parameterized import parameterized
1818

1919
from monai.transforms import AddExtremePointsChannel
20-
from tests.utils import TEST_NDARRAYS, assert_allclose
20+
from tests.test_utils import TEST_NDARRAYS, assert_allclose
2121

2222
IMG_CHANNEL = 3
2323
TESTS = []

0 commit comments

Comments
 (0)