]> granicus.if.org Git - python/commitdiff
Don't fail if the (sub)pkgname already exist.
authorNeal Norwitz <nnorwitz@gmail.com>
Tue, 30 May 2006 07:21:10 +0000 (07:21 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Tue, 30 May 2006 07:21:10 +0000 (07:21 +0000)
Lib/test/test_repr.py

index 4ded4846f6355403bc0414d86c937970abd7bfce..a37499f1f5f717a8d25e844d2faac3885785b545 100644 (file)
@@ -5,6 +5,7 @@
 
 import sys
 import os
+import shutil
 import unittest
 
 from test.test_support import run_unittest
@@ -198,8 +199,10 @@ class LongReprTest(unittest.TestCase):
         self.pkgname = os.path.join(longname)
         self.subpkgname = os.path.join(longname, longname)
         # Make the package and subpackage
+        shutil.rmtree(self.pkgname, ignore_errors=True)
         os.mkdir(self.pkgname)
         touch(os.path.join(self.pkgname, '__init__'+os.extsep+'py'))
+        shutil.rmtree(self.subpkgname, ignore_errors=True)
         os.mkdir(self.subpkgname)
         touch(os.path.join(self.subpkgname, '__init__'+os.extsep+'py'))
         # Remember where we are