#11420: make test suite pass with -B/DONTWRITEBYTECODE set. Initial patch by Thomas Wouters.

This commit is contained in:
Ezio Melotti 2013-03-16 19:48:51 +02:00
parent 58e1e50be1
commit c28f6fa505
6 changed files with 52 additions and 29 deletions

View file

@ -127,7 +127,8 @@ class SimpleTest(unittest.TestCase):
finally:
os.unlink(file_path)
pycache = os.path.dirname(imp.cache_from_source(file_path))
shutil.rmtree(pycache)
if os.path.exists(pycache):
shutil.rmtree(pycache)
def test_timestamp_overflow(self):
# When a modification timestamp is larger than 2**32, it should be