aboutsummaryrefslogtreecommitdiff
path: root/Lib
diff options
context:
space:
mode:
authorHynek Schlawack <hs@ox.cx>2012-12-10 10:07:11 +0100
committerHynek Schlawack <hs@ox.cx>2012-12-10 10:07:11 +0100
commit9e8ac56e35c04a5326af6683f9dc491dee67f8fe (patch)
tree80e0cf4ca58a956d6fe6325ba0914962d4f8c7ca /Lib
parent#15872: Add tests for a 3.3 regression in the new fd-based shutil.rmtree (diff)
downloadcpython-9e8ac56e35c04a5326af6683f9dc491dee67f8fe.tar.gz
cpython-9e8ac56e35c04a5326af6683f9dc491dee67f8fe.tar.bz2
cpython-9e8ac56e35c04a5326af6683f9dc491dee67f8fe.zip
#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 da426049227..9dab5f510d4 100644
--- a/Lib/test/test_shutil.py
+++ b/Lib/test/test_shutil.py
@@ -132,7 +132,11 @@ class TestShutil(unittest.TestCase):
filename = os.path.join(tmpdir, "tstfile")
with self.assertRaises(OSError) 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 honoured
shutil.rmtree(filename, ignore_errors=True)