From: Antoine Pitrou Date: Fri, 29 Oct 2010 11:08:32 +0000 (+0000) Subject: Fix ResourceWarning in Lib/test/threaded_import_hangers.py X-Git-Tag: v3.2a4~299 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5efe9d0865235d61f4c8c8d339a398a9adb50aca;p=thirdparty%2FPython%2Fcpython.git Fix ResourceWarning in Lib/test/threaded_import_hangers.py --- diff --git a/Lib/test/threaded_import_hangers.py b/Lib/test/threaded_import_hangers.py index d7508741d3fe..adf03e31ffd6 100644 --- a/Lib/test/threaded_import_hangers.py +++ b/Lib/test/threaded_import_hangers.py @@ -29,7 +29,7 @@ class Worker(threading.Thread): 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, ('.',)),