summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrett Cannon <brett@python.org>2012-04-14 19:06:17 (GMT)
committerBrett Cannon <brett@python.org>2012-04-14 19:06:17 (GMT)
commitafbdc13c1b6141f1690a19bebdbf3a131cbfcf84 (patch)
tree8b17189a194d306db4b4003ac8f4fdf8e9eb8e9c
parent73def61edda551d8374bad949ceb287b4c783df1 (diff)
downloadcpython-afbdc13c1b6141f1690a19bebdbf3a131cbfcf84.zip
cpython-afbdc13c1b6141f1690a19bebdbf3a131cbfcf84.tar.gz
cpython-afbdc13c1b6141f1690a19bebdbf3a131cbfcf84.tar.bz2
Fix an import race condition.
-rw-r--r--Lib/test/test_coding.py4
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()