#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.
This commit is contained in:
Hynek Schlawack 2012-12-10 12:01:28 +01:00
parent 9a4a750673
commit b9e9f3e70d
1 changed files with 1 additions and 1 deletions

View File

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