Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f29b493

Browse files
committed
#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.
2 parents 9d5e0cc + b9e9f3e commit f29b493

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/test/test_shutil.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def test_rmtree_errors(self):
171171
filename = os.path.join(tmpdir, "tstfile")
172172
with self.assertRaises(NotADirectoryError) as cm:
173173
shutil.rmtree(filename)
174-
if os.name == 'nt':
174+
if cm.exception.filename.endswith('*.*'):
175175
rm_name = os.path.join(filename, '*.*')
176176
else:
177177
rm_name = filename

0 commit comments

Comments
 (0)