mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #13645: fix test_import failure when run immediately after test_coding.
This commit is contained in:
parent
08c08eb93c
commit
28f8bee5c8
1 changed files with 2 additions and 1 deletions
|
@ -107,8 +107,9 @@ class ImportTests(unittest.TestCase):
|
|||
open(fname, 'w').close()
|
||||
os.chmod(fname, (stat.S_IRUSR | stat.S_IRGRP | stat.S_IROTH |
|
||||
stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH))
|
||||
__import__(TESTFN)
|
||||
fn = imp.cache_from_source(fname)
|
||||
unlink(fn)
|
||||
__import__(TESTFN)
|
||||
if not os.path.exists(fn):
|
||||
self.fail("__import__ did not result in creation of "
|
||||
"either a .pyc or .pyo file")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue