Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 9d5e0cc + b9e9f3e commit f29b493Copy full SHA for f29b493
1 file changed
Lib/test/test_shutil.py
@@ -171,7 +171,7 @@ def test_rmtree_errors(self):
171
filename = os.path.join(tmpdir, "tstfile")
172
with self.assertRaises(NotADirectoryError) as cm:
173
shutil.rmtree(filename)
174
- if os.name == 'nt':
+ if cm.exception.filename.endswith('*.*'):
175
rm_name = os.path.join(filename, '*.*')
176
else:
177
rm_name = filename
0 commit comments