[Python-checkins] r85923 - python/branches/py3k/Lib/test/threaded_import_hangers.py

antoine.pitrou python-checkins at python.org
Fri Oct 29 13:08:33 CEST 2010


Author: antoine.pitrou
Date: Fri Oct 29 13:08:32 2010
New Revision: 85923

Log:
Fix ResourceWarning in Lib/test/threaded_import_hangers.py



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

Modified: python/branches/py3k/Lib/test/threaded_import_hangers.py
==============================================================================
--- python/branches/py3k/Lib/test/threaded_import_hangers.py	(original)
+++ python/branches/py3k/Lib/test/threaded_import_hangers.py	Fri Oct 29 13:08:32 2010
@@ -29,7 +29,7 @@
 
 for name, func, args in [
         # Bug 147376:  TemporaryFile hung on Windows, starting in Python 2.4.
-        ("tempfile.TemporaryFile", tempfile.TemporaryFile, ()),
+        ("tempfile.TemporaryFile", lambda: tempfile.TemporaryFile().close(), ()),
 
         # The real cause for bug 147376:  ntpath.abspath() caused the hang.
         ("os.path.abspath", os.path.abspath, ('.',)),


More information about the Python-checkins mailing list