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

Skip to content

Commit b9e9f3e

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.
1 parent 9a4a750 commit b9e9f3e

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
@@ -132,7 +132,7 @@ def test_rmtree_errors(self):
132132
filename = os.path.join(tmpdir, "tstfile")
133133
with self.assertRaises(OSError) as cm:
134134
shutil.rmtree(filename)
135-
if os.name == 'nt':
135+
if cm.exception.filename.endswith('*.*'):
136136
rm_name = os.path.join(filename, '*.*')
137137
else:
138138
rm_name = filename

0 commit comments

Comments
 (0)