summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_importlib
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2013-03-16 19:50:04 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2013-03-16 19:50:04 (GMT)
commit469da97c1e7b1a36771ed6fe819473ba81569422 (patch)
tree3ef7b602007ddd6e0d8d5fe48ac9a03d5e29a14e /Lib/test/test_importlib
parent2d6acd2ac2399ecc0f163c12c5695f434ba14955 (diff)
parente5e7a7cbf450f80fa9a88038878b6bd525313f37 (diff)
downloadcpython-469da97c1e7b1a36771ed6fe819473ba81569422.zip
cpython-469da97c1e7b1a36771ed6fe819473ba81569422.tar.gz
cpython-469da97c1e7b1a36771ed6fe819473ba81569422.tar.bz2
#11420: merge with 3.3.
Diffstat (limited to 'Lib/test/test_importlib')
-rw-r--r--Lib/test/test_importlib/source/test_file_loader.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_importlib/source/test_file_loader.py b/Lib/test/test_importlib/source/test_file_loader.py
index dd28e8f..80999e8 100644
--- a/Lib/test/test_importlib/source/test_file_loader.py
+++ b/Lib/test/test_importlib/source/test_file_loader.py
@@ -159,7 +159,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