From cde0fa9c61192d5bfdcc065c85a53b02fb9e4197 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Sat, 22 Jul 2006 17:00:57 +0000 Subject: Don't fail if the directory already exists --- Lib/test/test_filecmp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_filecmp.py b/Lib/test/test_filecmp.py index c54119c..503562b 100644 --- a/Lib/test/test_filecmp.py +++ b/Lib/test/test_filecmp.py @@ -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 -- cgit v0.12