Don't fail if the directory already exists

This commit is contained in:
Neal Norwitz 2006-07-22 17:00:57 +00:00
parent b59d08c2fb
commit cde0fa9c61
1 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,5 @@
import os, filecmp, shutil, tempfile
import os, filecmp, shutil, tempfile, shutil
import unittest
from test import test_support
@ -49,6 +49,7 @@ class DirCompareTestCase(unittest.TestCase):
self.caseinsensitive = os.path.normcase('A') == os.path.normcase('a')
data = 'Contents of file go here.\n'
for dir in [self.dir, self.dir_same, self.dir_diff]:
shutil.rmtree(dir, True)
os.mkdir(dir)
if self.caseinsensitive and dir is self.dir_same:
fn = 'FiLe' # Verify case-insensitive comparison