diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-08-11 20:12:20 +0300 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-08-11 20:12:20 +0300 |
commit | b212291b08b8c7beffe8b2dbdd211ded05c84087 (patch) | |
tree | 0501190ceeee0df1a8180d055cd4703ebe32b6fe /Lib/test/test_imp.py | |
parent | #18663: document that assertAlmostEqual also works when the values are equal ... (diff) | |
download | cpython-b212291b08b8c7beffe8b2dbdd211ded05c84087.tar.gz cpython-b212291b08b8c7beffe8b2dbdd211ded05c84087.tar.bz2 cpython-b212291b08b8c7beffe8b2dbdd211ded05c84087.zip |
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 ade3e2564f3..3fb119bfc3f 100644 --- a/Lib/test/test_imp.py +++ b/Lib/test/test_imp.py @@ -278,8 +278,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) |