]> granicus.if.org Git - python/commitdiff
Actually finish the tests for r87182
authorNick Coghlan <ncoghlan@gmail.com>
Mon, 13 Dec 2010 03:02:43 +0000 (03:02 +0000)
committerNick Coghlan <ncoghlan@gmail.com>
Mon, 13 Dec 2010 03:02:43 +0000 (03:02 +0000)
Lib/test/test_tempfile.py

index eebf78f6fd74c4047ded125dda6a5dbadbb1ae5d..536e1ca61eee359899fa49f3ffd18183cc406cea 100644 (file)
@@ -928,9 +928,11 @@ class test_TemporaryDirectory(TC):
     def test_mkdtemp_failure(self):
         # Check no additional exception if mkdtemp fails
         # Previously would raise AttributeError instead
-        # (noted as part of Issue #10888)
-        #with self.assertRaises(os.error):
-        tempfile.TemporaryDirectory(prefix="[]<>?*!:")
+        # (noted as part of Issue #10188)
+        with tempfile.TemporaryDirectory() as nonexistent:
+            pass
+        with self.assertRaises(os.error):
+            tempfile.TemporaryDirectory(dir=nonexistent)
 
     def test_explicit_cleanup(self):
         # A TemporaryDirectory is deleted when cleaned up