summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_importlib
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-07-12 03:50:03 (GMT)
committerGitHub <noreply@github.com>2017-07-12 03:50:03 (GMT)
commit8a9cd20edca7d01b68292036029ae3735ce65edd (patch)
treef4df7b29b7d32eb5a860e325f2114beea561e57b /Lib/test/test_importlib
parent6d13b22e3ab262c6b1f068259aebd705e7da316c (diff)
downloadcpython-8a9cd20edca7d01b68292036029ae3735ce65edd.zip
cpython-8a9cd20edca7d01b68292036029ae3735ce65edd.tar.gz
cpython-8a9cd20edca7d01b68292036029ae3735ce65edd.tar.bz2
bpo-30876: Relative import from unloaded package now reimports the package (#2639)
instead of failing with SystemError. Relative import from non-package now fails with ImportError rather than SystemError.
Diffstat (limited to 'Lib/test/test_importlib')
-rw-r--r--Lib/test/test_importlib/import_/test___package__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_importlib/import_/test___package__.py b/Lib/test/test_importlib/import_/test___package__.py
index 7f64548..b26634e 100644
--- a/Lib/test/test_importlib/import_/test___package__.py
+++ b/Lib/test/test_importlib/import_/test___package__.py
@@ -81,7 +81,7 @@ class Using__package__:
def test_bad__package__(self):
globals = {'__package__': '<not real>'}
- with self.assertRaises(SystemError):
+ with self.assertRaises(ModuleNotFoundError):
self.__import__('', globals, {}, ['relimport'], 1)
def test_bunk__package__(self):