diff --git a/tests/test_other.py b/tests/test_other.py index c7f4bd27..41435b8d 100644 --- a/tests/test_other.py +++ b/tests/test_other.py @@ -17,7 +17,7 @@ def test_nonexistent_path(self): for key in list(sys.modules.keys()): if "snopt" in key: sys.modules.pop(key) - with self.assertWarns(ImportWarning): + with self.assertWarns(UserWarning): module = try_import_compiled_module_from_path("snopt", "/a/nonexistent/path") self.assertTrue(isinstance(module, str))