diff options
author | Brett Cannon <brett@python.org> | 2016-02-20 20:59:36 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2016-02-20 20:59:36 (GMT) |
commit | 0911c0d27176bb0501b87dd65ebfb47bc3da4e12 (patch) | |
tree | 0ad28eb66cc7c7c4846af1f7f44523288c43fb01 /Lib/test/test_importlib | |
parent | d9dc53021e11c357592f7ecc4aa9e5dba9bcd359 (diff) | |
parent | 4f38cb41fe022c94bb5569c72d8b48020d8c13d4 (diff) | |
download | cpython-0911c0d27176bb0501b87dd65ebfb47bc3da4e12.zip cpython-0911c0d27176bb0501b87dd65ebfb47bc3da4e12.tar.gz cpython-0911c0d27176bb0501b87dd65ebfb47bc3da4e12.tar.bz2 |
Merge for issue #26367
Diffstat (limited to 'Lib/test/test_importlib')
-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 1cad6b3..42edc78 100644 --- a/Lib/test/test_importlib/import_/test_relative_imports.py +++ b/Lib/test/test_importlib/import_/test_relative_imports.py @@ -218,6 +218,11 @@ class RelativeImports: self.__import__('a', {'__package__': '', '__spec__': None}, level=1) + def test_relative_import_no_package_exists_absolute(self): + with self.assertRaises(ImportError): + self.__import__('sys', {'__package__': '', '__spec__': None}, + level=1) + (Frozen_RelativeImports, Source_RelativeImports |