diff options
| author | Antoine Pitrou <solipsis@pitrou.net> | 2010-10-29 11:08:32 +0000 |
|---|---|---|
| committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-10-29 11:08:32 +0000 |
| commit | 5efe9d0865235d61f4c8c8d339a398a9adb50aca (patch) | |
| tree | 7c9aab982334a422ebc47dc399429ea8c6b10680 | |
| parent | 14d8fe7de85a99284f407ea282220b9a050ba940 (diff) | |
| download | cpython-git-5efe9d0865235d61f4c8c8d339a398a9adb50aca.tar.gz | |
Fix ResourceWarning in Lib/test/threaded_import_hangers.py
| -rw-r--r-- | Lib/test/threaded_import_hangers.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/threaded_import_hangers.py b/Lib/test/threaded_import_hangers.py index d7508741d3..adf03e31ff 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, ('.',)), |
