summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tarfile.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2006-05-15 21:32:25 (GMT)
committerTim Peters <tim.peters@gmail.com>2006-05-15 21:32:25 (GMT)
commit4ccc0b7dfe7966e85c51a091b655622f6bbe05b1 (patch)
tree9c26427d3b711a35288457a6d4b93b83a8391789 /Lib/test/test_tarfile.py
parent12087bae18ac349338fab42a42e28e941de23477 (diff)
downloadcpython-4ccc0b7dfe7966e85c51a091b655622f6bbe05b1.zip
cpython-4ccc0b7dfe7966e85c51a091b655622f6bbe05b1.tar.gz
cpython-4ccc0b7dfe7966e85c51a091b655622f6bbe05b1.tar.bz2
test_directory(): Remove the leftover temp directory that's making
the Windows buildbots fail test_tarfile.
Diffstat (limited to 'Lib/test/test_tarfile.py')
-rw-r--r--Lib/test/test_tarfile.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py
index 0f3df7f..503de26 100644
--- a/Lib/test/test_tarfile.py
+++ b/Lib/test/test_tarfile.py
@@ -295,6 +295,10 @@ class WriteSize0Test(BaseTest):
def test_directory(self):
path = os.path.join(self.tmpdir, "directory")
+ if os.path.exists(path):
+ # This shouldn't be necessary, but is <wink> if a previous
+ # run was killed in mid-stream.
+ shutil.rmtree(path)
os.mkdir(path)
tarinfo = self.dst.gettarinfo(path)
self.assertEqual(tarinfo.size, 0)