[Python-checkins] cpython (merge 3.2 -> 3.3): #15872: Be flexible with appending *.* in shutil.rmtree test case

hynek.schlawack python-checkins at python.org
Mon Dec 10 12:07:03 CET 2012


http://hg.python.org/cpython/rev/edb747c6c479
changeset:   80810:edb747c6c479
branch:      3.3
parent:      80807:a05e2d4094ea
parent:      80809:2d953d47d634
user:        Hynek Schlawack <hs at ox.cx>
date:        Mon Dec 10 12:02:26 2012 +0100
summary:
  #15872: Be flexible with appending *.* in shutil.rmtree test case

The Windows buildbots seem to be unable to agree whether they need them or not.

files:
  Lib/test/test_shutil.py |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py
--- a/Lib/test/test_shutil.py
+++ b/Lib/test/test_shutil.py
@@ -171,7 +171,7 @@
         filename = os.path.join(tmpdir, "tstfile")
         with self.assertRaises(NotADirectoryError) as cm:
             shutil.rmtree(filename)
-        if os.name == 'nt':
+        if cm.exception.filename.endswith('*.*'):
             rm_name = os.path.join(filename, '*.*')
         else:
             rm_name = filename

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list