From: Hynek Schlawack Date: Mon, 10 Dec 2012 11:02:26 +0000 (+0100) Subject: #15872: Be flexible with appending *.* in shutil.rmtree test case X-Git-Tag: v3.3.1rc1~542 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f29b4937f725681ad1b747ccd629ad022eb8c02e;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. --- f29b4937f725681ad1b747ccd629ad022eb8c02e diff --cc Lib/test/test_shutil.py index 92ab0a4150a3,9509d2a69f96..e0ecbf7601d4 --- a/Lib/test/test_shutil.py +++ b/Lib/test/test_shutil.py @@@ -167,11 -128,11 +167,11 @@@ class TestShutil(unittest.TestCase) # existing file tmpdir = self.mkdtemp() - self.write_file((tmpdir, "tstfile"), "") + write_file((tmpdir, "tstfile"), "") filename = os.path.join(tmpdir, "tstfile") - with self.assertRaises(OSError) as cm: + 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