From 4ccc0b7dfe7966e85c51a091b655622f6bbe05b1 Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Mon, 15 May 2006 21:32:25 +0000 Subject: test_directory(): Remove the leftover temp directory that's making the Windows buildbots fail test_tarfile. --- Lib/test/test_tarfile.py | 4 ++++ 1 file changed, 4 insertions(+) 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 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) -- cgit v0.12