diff --git a/tests/example_test.py b/tests/example_test.py index 7392c1a..91d2f10 100644 --- a/tests/example_test.py +++ b/tests/example_test.py @@ -25,7 +25,7 @@ def _set_random_seed(): def kitchen_scene(): try: from scene_synthesizer import examples - except ModuleNotFoundError as e: + except ImportError as e: pytest.skip(f"Skipping because module not found: {e}") _set_random_seed() @@ -43,7 +43,7 @@ def kitchen_scene(): def kitchen_scene_collision(): try: from scene_synthesizer import examples - except ModuleNotFoundError as e: + except ImportError as e: pytest.skip(f"Skipping because module not found: {e}") _set_random_seed() diff --git a/tests/exports_test.py b/tests/exports_test.py index 211423c..47ec9a2 100644 --- a/tests/exports_test.py +++ b/tests/exports_test.py @@ -30,7 +30,7 @@ def _set_random_seed(): def kitchen_scene(): try: from scene_synthesizer import examples - except ModuleNotFoundError as e: + except ImportError as e: pytest.skip(f"Skipping because module not found: {e}") _set_random_seed() @@ -48,7 +48,7 @@ def kitchen_scene(): def kitchen_scene_collision(): try: from scene_synthesizer import examples - except ModuleNotFoundError as e: + except ImportError as e: pytest.skip(f"Skipping because module not found: {e}") _set_random_seed() diff --git a/tests/test_utils.py b/tests/test_utils.py index 99b66c8..f817dca 100644 --- a/tests/test_utils.py +++ b/tests/test_utils.py @@ -17,7 +17,7 @@ def wrapper(*args, **kwargs): except ErrorException as e: if 'Failed to open layer' in str(e): pytest.skip(f"Skipping: {e}") - except ModuleNotFoundError as e: + except ImportError as e: pytest.skip(f"Skipping: {e}") return ret return functools.update_wrapper(wrapper, func)