Kaydet (Commit) 28f8bee5 authored tarafından Antoine Pitrou's avatar Antoine Pitrou

Issue #13645: fix test_import failure when run immediately after test_coding.

üst 08c08eb9
...@@ -107,8 +107,9 @@ class ImportTests(unittest.TestCase): ...@@ -107,8 +107,9 @@ class ImportTests(unittest.TestCase):
open(fname, 'w').close() open(fname, 'w').close()
os.chmod(fname, (stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH | os.chmod(fname, (stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH |
stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)) stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH))
__import__(TESTFN)
fn = imp.cache_from_source(fname) fn = imp.cache_from_source(fname)
unlink(fn)
__import__(TESTFN)
if not os.path.exists(fn): if not os.path.exists(fn):
self.fail("__import__ did not result in creation of " self.fail("__import__ did not result in creation of "
"either a .pyc or .pyo file") "either a .pyc or .pyo file")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment