summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_concurrent_futures.py
diff options
context:
space:
mode:
authorBrian Quinlan <brian@sweetapp.com>2010-12-25 00:18:27 (GMT)
committerBrian Quinlan <brian@sweetapp.com>2010-12-25 00:18:27 (GMT)
commit291151b7f401be9f38de36664f0f3c0a60829a6e (patch)
tree8a878979222311ae861a408147cb0fd8afd903c5 /Lib/test/test_concurrent_futures.py
parenta3015a6a827ad852bf1875e6e40d64063d895cd4 (diff)
downloadcpython-291151b7f401be9f38de36664f0f3c0a60829a6e.zip
cpython-291151b7f401be9f38de36664f0f3c0a60829a6e.tar.gz
cpython-291151b7f401be9f38de36664f0f3c0a60829a6e.tar.bz2
Assign closed handles to None to make errors more obvious if they are used.
Diffstat (limited to 'Lib/test/test_concurrent_futures.py')
-rw-r--r--Lib/test/test_concurrent_futures.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_concurrent_futures.py b/Lib/test/test_concurrent_futures.py
index 7baf0a2..876d994 100644
--- a/Lib/test/test_concurrent_futures.py
+++ b/Lib/test/test_concurrent_futures.py
@@ -125,6 +125,8 @@ class Call(object):
if sys.platform.startswith('win'):
ctypes.windll.kernel32.CloseHandle(self._called_event)
ctypes.windll.kernel32.CloseHandle(self._can_finish)
+ self._called_event = None
+ self._can_finish = None
else:
del self.CALL_LOCKS[self._called_event]
del self.CALL_LOCKS[self._can_finish]
@@ -375,8 +377,6 @@ class WaitTests(unittest.TestCase):
self.assertEqual(set([future1, future2]), finished)
self.assertEqual(set(), pending)
-
-
finally:
call1.close()
call2.close()