From: Tim Peters Date: Mon, 15 May 2006 21:32:25 +0000 (+0000) Subject: test_directory(): Remove the leftover temp directory that's making X-Git-Tag: v2.5b1~644 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4ccc0b7dfe7966e85c51a091b655622f6bbe05b1;p=python test_directory(): Remove the leftover temp directory that's making the Windows buildbots fail test_tarfile. --- diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py index 0f3df7fa06..503de26c9a 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)