diff options
author | Brett Cannon <brett@python.org> | 2012-04-14 15:06:17 -0400 |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2012-04-14 15:06:17 -0400 |
commit | ac53fac9501e05360598f9508d287a1a00818d7b (patch) | |
tree | c207905cc93494e898861da01fe45e8e506b93fe /Lib/test/test_coding.py | |
parent | 32439ae9b54545f86a030949e9a4fbfdfd29a955 (diff) | |
download | cpython-ac53fac9501e05360598f9508d287a1a00818d7b.tar.gz |
Fix an import race condition.
Diffstat (limited to 'Lib/test/test_coding.py')
-rw-r--r-- | Lib/test/test_coding.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_coding.py b/Lib/test/test_coding.py index f9db0b40f0..dfd5431dee 100644 --- a/Lib/test/test_coding.py +++ b/Lib/test/test_coding.py @@ -1,7 +1,6 @@ - import test.support, unittest from test.support import TESTFN, unlink, unload -import os, sys +import importlib, os, sys class CodingTest(unittest.TestCase): def test_bad_coding(self): @@ -40,6 +39,7 @@ class CodingTest(unittest.TestCase): f.write("'A very long string %s'\n" % ("X" * 1000)) f.close() + importlib.invalidate_caches() __import__(TESTFN) finally: f.close() |