summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_imp.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2013-08-10 17:01:43 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2013-08-10 17:01:43 (GMT)
commitfbcf4d78c881176345483111503c4bc7765d4ff8 (patch)
tree79d1732ee9198f78db6f771599a71a3323138d73 /Lib/test/test_imp.py
parentb37278cc9b9c5a3044ce0bb963b572106e95f612 (diff)
parent056bafe7a663e890594a11eec99c78f742452fff (diff)
downloadcpython-fbcf4d78c881176345483111503c4bc7765d4ff8.zip
cpython-fbcf4d78c881176345483111503c4bc7765d4ff8.tar.gz
cpython-fbcf4d78c881176345483111503c4bc7765d4ff8.tar.bz2
#18681: merge with 3.3.
Diffstat (limited to 'Lib/test/test_imp.py')
-rw-r--r--Lib/test/test_imp.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_imp.py b/Lib/test/test_imp.py
index cf50ea4..833bf19 100644
--- a/Lib/test/test_imp.py
+++ b/Lib/test/test_imp.py
@@ -314,6 +314,15 @@ class ReloadTests(unittest.TestCase):
import marshal
imp.reload(marshal)
+ def test_with_deleted_parent(self):
+ # see #18681
+ from html import parser
+ del sys.modules['html']
+ def cleanup(): del sys.modules['html.parser']
+ self.addCleanup(cleanup)
+ with self.assertRaisesRegex(ImportError, 'html'):
+ imp.reload(parser)
+
class PEP3147Tests(unittest.TestCase):
"""Tests of PEP 3147."""