From b7a5ebfdd32f58fef45d19dfd50f817ab50efd8e Mon Sep 17 00:00:00 2001 From: Wenqi Li Date: Mon, 8 Feb 2021 13:51:14 +0000 Subject: [PATCH] extention -> extension Signed-off-by: Wenqi Li --- tests/test_bilateral_approx_cpu.py | 4 ++-- tests/test_bilateral_approx_cuda.py | 4 ++-- tests/test_bilateral_precise.py | 6 +++--- tests/test_phl_cpu.py | 4 ++-- tests/test_phl_cuda.py | 4 ++-- tests/utils.py | 6 +++--- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/test_bilateral_approx_cpu.py b/tests/test_bilateral_approx_cpu.py index 71cf53519c..2b6088a56f 100644 --- a/tests/test_bilateral_approx_cpu.py +++ b/tests/test_bilateral_approx_cpu.py @@ -16,7 +16,7 @@ from parameterized import parameterized from monai.networks.layers.filtering import BilateralFilter -from tests.utils import skip_if_no_cpp_extention +from tests.utils import skip_if_no_cpp_extension TEST_CASES = [ [ @@ -360,7 +360,7 @@ ] -@skip_if_no_cpp_extention +@skip_if_no_cpp_extension class BilateralFilterTestCaseCpuApprox(unittest.TestCase): @parameterized.expand(TEST_CASES) def test_cpu_approx(self, test_case_description, sigmas, input, expected): diff --git a/tests/test_bilateral_approx_cuda.py b/tests/test_bilateral_approx_cuda.py index d0515d60e5..fdaba26f72 100644 --- a/tests/test_bilateral_approx_cuda.py +++ b/tests/test_bilateral_approx_cuda.py @@ -16,7 +16,7 @@ from parameterized import parameterized from monai.networks.layers.filtering import BilateralFilter -from tests.utils import skip_if_no_cpp_extention, skip_if_no_cuda +from tests.utils import skip_if_no_cpp_extension, skip_if_no_cuda TEST_CASES = [ [ @@ -361,7 +361,7 @@ @skip_if_no_cuda -@skip_if_no_cpp_extention +@skip_if_no_cpp_extension class BilateralFilterTestCaseCudaApprox(unittest.TestCase): @parameterized.expand(TEST_CASES) def test_cuda_approx(self, test_case_description, sigmas, input, expected): diff --git a/tests/test_bilateral_precise.py b/tests/test_bilateral_precise.py index b02f3f04df..db2ee88239 100644 --- a/tests/test_bilateral_precise.py +++ b/tests/test_bilateral_precise.py @@ -16,7 +16,7 @@ from parameterized import parameterized from monai.networks.layers.filtering import BilateralFilter -from tests.utils import skip_if_no_cpp_extention, skip_if_no_cuda +from tests.utils import skip_if_no_cpp_extension, skip_if_no_cuda TEST_CASES = [ [ @@ -360,7 +360,7 @@ ] -@skip_if_no_cpp_extention +@skip_if_no_cpp_extension class BilateralFilterTestCaseCpuPrecised(unittest.TestCase): @parameterized.expand(TEST_CASES) def test_cpu_precised(self, test_case_description, sigmas, input, expected): @@ -378,7 +378,7 @@ def test_cpu_precised(self, test_case_description, sigmas, input, expected): @skip_if_no_cuda -@skip_if_no_cpp_extention +@skip_if_no_cpp_extension class BilateralFilterTestCaseCudaPrecised(unittest.TestCase): @parameterized.expand(TEST_CASES) def test_cuda_precised(self, test_case_description, sigmas, input, expected): diff --git a/tests/test_phl_cpu.py b/tests/test_phl_cpu.py index f0e62cbddb..ec6d58824d 100644 --- a/tests/test_phl_cpu.py +++ b/tests/test_phl_cpu.py @@ -16,7 +16,7 @@ from parameterized import parameterized from monai.networks.layers.filtering import PHLFilter -from tests.utils import skip_if_no_cpp_extention +from tests.utils import skip_if_no_cpp_extension TEST_CASES = [ [ @@ -238,7 +238,7 @@ ] -@skip_if_no_cpp_extention +@skip_if_no_cpp_extension class PHLFilterTestCaseCpu(unittest.TestCase): @parameterized.expand(TEST_CASES) def test_cpu(self, test_case_description, sigmas, input, features, expected): diff --git a/tests/test_phl_cuda.py b/tests/test_phl_cuda.py index 8b89efce1a..d7538f14fa 100644 --- a/tests/test_phl_cuda.py +++ b/tests/test_phl_cuda.py @@ -16,7 +16,7 @@ from parameterized import parameterized from monai.networks.layers.filtering import PHLFilter -from tests.utils import skip_if_no_cpp_extention, skip_if_no_cuda +from tests.utils import skip_if_no_cpp_extension, skip_if_no_cuda TEST_CASES = [ [ @@ -146,7 +146,7 @@ @skip_if_no_cuda -@skip_if_no_cpp_extention +@skip_if_no_cpp_extension class PHLFilterTestCaseCuda(unittest.TestCase): @parameterized.expand(TEST_CASES) def test_cuda(self, test_case_description, sigmas, input, features, expected): diff --git a/tests/utils.py b/tests/utils.py index ebc9bff99f..8de82bee82 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -81,11 +81,11 @@ def __call__(self, obj): return unittest.skipIf(self.module_avail, f"Skipping because optional module present: {self.module_name}")(obj) -def skip_if_no_cpp_extention(obj): +def skip_if_no_cpp_extension(obj): """ - Skip the unit tests if the cpp extention isnt available + Skip the unit tests if the cpp extension is not available """ - return unittest.skipUnless(USE_COMPILED, "Skipping cpp extention tests")(obj) + return unittest.skipUnless(USE_COMPILED, "Skipping cpp extension tests")(obj) def skip_if_no_cuda(obj):