test_directory(): Remove the leftover temp directory that's making

the Windows buildbots fail test_tarfile.
This commit is contained in:
Tim Peters 2006-05-15 21:32:25 +00:00
parent 12087bae18
commit 4ccc0b7dfe
1 changed files with 4 additions and 0 deletions

View File

@ -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)