#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:02:26 +01:00
commit f29b4937f7
1 changed files with 1 additions and 1 deletions

View File

@ -171,7 +171,7 @@ class TestShutil(unittest.TestCase):
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