]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
#15872: Be flexible with appending *.* in shutil.rmtree test case
authorHynek Schlawack <hs@ox.cx>
Mon, 10 Dec 2012 11:01:28 +0000 (12:01 +0100)
committerHynek Schlawack <hs@ox.cx>
Mon, 10 Dec 2012 11:01:28 +0000 (12:01 +0100)
The Windows buildbots seem to be unable to agree whether they need them or not.

Lib/test/test_shutil.py

index 1eb5e892e81e38ff1a9a7a2e180fc03d702f39f8..9509d2a69f961cd7253aae12289e8b26bd434dc5 100644 (file)
@@ -132,7 +132,7 @@ class TestShutil(unittest.TestCase):
         filename = os.path.join(tmpdir, "tstfile")
         with self.assertRaises(OSError) as cm:
             shutil.rmtree(filename)
-        if os.name == 'nt':
+        if cm.exception.filename.endswith('*.*'):
             rm_name = os.path.join(filename, '*.*')
         else:
             rm_name = filename