diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-08-11 17:13:36 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-08-11 17:13:36 (GMT) |
commit | 3ee11407f847369fa8ae1527d76c6f2570087570 (patch) | |
tree | cb4679d0a1e6d752e6588db5719a99309f000d87 /Lib/test/test_imp.py | |
parent | b2855ccd09e8e4d6629d83361016f7fdc51c75a5 (diff) | |
parent | b212291b08b8c7beffe8b2dbdd211ded05c84087 (diff) | |
download | cpython-3ee11407f847369fa8ae1527d76c6f2570087570.zip cpython-3ee11407f847369fa8ae1527d76c6f2570087570.tar.gz cpython-3ee11407f847369fa8ae1527d76c6f2570087570.tar.bz2 |
Issue #18706: Fix a test for issue #18681 so it no longer breaks test_codeccallbacks*.
Diffstat (limited to 'Lib/test/test_imp.py')
-rw-r--r-- | Lib/test/test_imp.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_imp.py b/Lib/test/test_imp.py index 833bf19..d324191 100644 --- a/Lib/test/test_imp.py +++ b/Lib/test/test_imp.py @@ -317,8 +317,9 @@ class ReloadTests(unittest.TestCase): def test_with_deleted_parent(self): # see #18681 from html import parser - del sys.modules['html'] - def cleanup(): del sys.modules['html.parser'] + html = sys.modules.pop('html') + def cleanup(): + sys.modules['html'] = html self.addCleanup(cleanup) with self.assertRaisesRegex(ImportError, 'html'): imp.reload(parser) |