mirror of
https://github.com/python/cpython.git
synced 2025-10-29 01:22:59 +00:00
Merge for issue #26367
This commit is contained in:
commit
0911c0d271
4 changed files with 410 additions and 394 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue