]> granicus.if.org Git - python/commitdiff
Fixed bug #1470
authorChristian Heimes <christian@cheimes.de>
Tue, 20 Nov 2007 01:48:48 +0000 (01:48 +0000)
committerChristian Heimes <christian@cheimes.de>
Tue, 20 Nov 2007 01:48:48 +0000 (01:48 +0000)
Lib/test/test_shutil.py

index da71fa83bcd886cc0a1e1df4116568f10219cf1a..56e928e436f943288ab124b04dba02c05e3b4555 100644 (file)
@@ -113,12 +113,9 @@ class TestShutil(unittest.TestCase):
                 ):
                 if os.path.exists(path):
                     os.remove(path)
-            for path in (
-                    os.path.join(src_dir, 'test_dir'),
-                    os.path.join(dst_dir, 'test_dir'),
-                ):
+            for path in (src_dir, os.path.join(dst_dir, os.path.pardir)):
                 if os.path.exists(path):
-                    os.removedirs(path)
+                    shutil.rmtree(path)
 
 
     if hasattr(os, "symlink"):