diff --git a/tests/serialization_tests.py b/tests/serialization_tests.py index 537e642c..a49ae7e6 100644 --- a/tests/serialization_tests.py +++ b/tests/serialization_tests.py @@ -736,7 +736,7 @@ def my_callable(): self.assertIs(finder['qctoolkit.asd'], my_callable) finder.qctoolkit_alias = False - with self.assertRaises(KeyError): + with self.assertRaises(ModuleNotFoundError): finder['qctoolkit.asd']