diff options
author | Brett Cannon <brett@python.org> | 2012-04-14 19:06:17 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2012-04-14 19:06:17 (GMT) |
commit | afbdc13c1b6141f1690a19bebdbf3a131cbfcf84 (patch) | |
tree | 8b17189a194d306db4b4003ac8f4fdf8e9eb8e9c | |
parent | 73def61edda551d8374bad949ceb287b4c783df1 (diff) | |
download | cpython-afbdc13c1b6141f1690a19bebdbf3a131cbfcf84.zip cpython-afbdc13c1b6141f1690a19bebdbf3a131cbfcf84.tar.gz cpython-afbdc13c1b6141f1690a19bebdbf3a131cbfcf84.tar.bz2 |
Fix an import race condition.
-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 f9db0b4..dfd5431 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() |