diff options
author | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2007-11-16 00:56:23 (GMT) |
---|---|---|
committer | Amaury Forgeot d'Arc <amauryfa@gmail.com> | 2007-11-16 00:56:23 (GMT) |
commit | dd9e3b8736fae1f730d027d5383a2b17c661ce82 (patch) | |
tree | 88aed29f2d777bc5dd81622b17088416a80c8c77 /Lib/test/test_import.py | |
parent | cf171a7fbcf4967feb7b4cd01c56250fb3fc8c8a (diff) | |
download | cpython-dd9e3b8736fae1f730d027d5383a2b17c661ce82.zip cpython-dd9e3b8736fae1f730d027d5383a2b17c661ce82.tar.gz cpython-dd9e3b8736fae1f730d027d5383a2b17c661ce82.tar.bz2 |
Correct a failing test when test_import is run after test_coding:
be sure to import a fresh module by removing it from sys.modules
Diffstat (limited to 'Lib/test/test_import.py')
-rw-r--r-- | Lib/test/test_import.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py index cdee38d..ffde136 100644 --- a/Lib/test/test_import.py +++ b/Lib/test/test_import.py @@ -54,6 +54,8 @@ class ImportTest(unittest.TestCase): print("b =", b, file=f) f.close() + if TESTFN in sys.modules: + del sys.modules[TESTFN] try: try: mod = __import__(TESTFN) |