Author: christian.heimes
Date: Tue Nov 20 02:45:17 2007
New Revision: 59063

Modified:
   python/branches/py3k/Lib/test/test_shutil.py
Log:
Fixed bug #1470
py3k unit tests are removing %TEMP% dir on Windows
os.removedirs removes all parent directories until it hits a non empty 
directory. In my case my %TEMP% directory was clean and empty.

Modified: python/branches/py3k/Lib/test/test_shutil.py
==============================================================================
--- python/branches/py3k/Lib/test/test_shutil.py        (original)
+++ python/branches/py3k/Lib/test/test_shutil.py        Tue Nov 20 02:45:17 2007
@@ -113,12 +113,9 @@
                 ):
                 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"):
_______________________________________________
Python-3000-checkins mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000-checkins

Reply via email to