[Python-checkins] r87204 - python/branches/py3k/Lib/test/test_tempfile.py

nick.coghlan python-checkins at python.org
Mon Dec 13 04:02:43 CET 2010


Author: nick.coghlan
Date: Mon Dec 13 04:02:43 2010
New Revision: 87204

Log:
Actually finish the tests for r87182

Modified:
   python/branches/py3k/Lib/test/test_tempfile.py

Modified: python/branches/py3k/Lib/test/test_tempfile.py
==============================================================================
--- python/branches/py3k/Lib/test/test_tempfile.py	(original)
+++ python/branches/py3k/Lib/test/test_tempfile.py	Mon Dec 13 04:02:43 2010
@@ -928,9 +928,11 @@
     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


More information about the Python-checkins mailing list