diff options
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_importlib/import_/test_relative_imports.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_importlib/import_/test_relative_imports.py b/Lib/test/test_importlib/import_/test_relative_imports.py index 28bb6f7..3bb819f 100644 --- a/Lib/test/test_importlib/import_/test_relative_imports.py +++ b/Lib/test/test_importlib/import_/test_relative_imports.py @@ -207,6 +207,11 @@ class RelativeImports: with self.assertRaises(KeyError): self.__import__('sys', level=1) + def test_relative_import_no_package_exists_absolute(self): + with self.assertRaises(SystemError): + self.__import__('sys', {'__package__': '', '__spec__': None}, + level=1) + (Frozen_RelativeImports, Source_RelativeImports |