summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorHynek Schlawack <hs@ox.cx>2012-12-10 09:10:40 (GMT)
committerHynek Schlawack <hs@ox.cx>2012-12-10 09:10:40 (GMT)
commit8e5a8296cc18d4f496549551bbf21d60ba535622 (patch)
treeb25e6d78c06338148cda80b32749978cf57df5d6 /Lib
parentae9a9e9a2d57ec91e7637ae19001ac167bae9038 (diff)
parentb57b09407767d340c655cb12acd4cc0a561cab0f (diff)
downloadcpython-8e5a8296cc18d4f496549551bbf21d60ba535622.zip
cpython-8e5a8296cc18d4f496549551bbf21d60ba535622.tar.gz
cpython-8e5a8296cc18d4f496549551bbf21d60ba535622.tar.bz2
#15872: Fix shutil.rmtree error tests for Windows
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_shutil.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/test_shutil.py b/Lib/test/test_shutil.py
index ad66631..2044340 100644
--- a/Lib/test/test_shutil.py
+++ b/Lib/test/test_shutil.py
@@ -172,7 +172,11 @@ class TestShutil(unittest.TestCase):
filename = os.path.join(tmpdir, "tstfile")
with self.assertRaises(NotADirectoryError) as cm:
shutil.rmtree(filename)
- self.assertEqual(cm.exception.filename, filename)
+ if os.name == 'nt':
+ rm_name = os.path.join(filename, '*.*')
+ else:
+ rm_name = filename
+ self.assertEqual(cm.exception.filename, rm_name)
self.assertTrue(os.path.exists(filename))
# test that ignore_errors option is honored
shutil.rmtree(filename, ignore_errors=True)