From: Hynek Schlawack Date: Mon, 10 Dec 2012 11:01:28 +0000 (+0100) Subject: #15872: Be flexible with appending *.* in shutil.rmtree test case X-Git-Tag: v3.2.4rc1~277 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b9e9f3e70d3e5c115d179331ce640b0610c5a243;p=thirdparty%2FPython%2Fcpython.git #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. --- diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py index 1eb5e892e81e..9509d2a69f96 100644 --- a/Lib/test/test_shutil.py +++ b/Lib/test/test_shutil.py @@ -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