Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes typos #1565

Merged
merged 2 commits into from
Feb 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/test_bilateral_approx_cpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
[
Expand Down Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_bilateral_approx_cuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
[
Expand Down Expand Up @@ -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):
Expand Down
6 changes: 3 additions & 3 deletions tests/test_bilateral_precise.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
[
Expand Down Expand Up @@ -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):
Expand All @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_phl_cpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
[
Expand Down Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_phl_cuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
[
Expand Down Expand Up @@ -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):
Expand Down
6 changes: 3 additions & 3 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down