[Python-checkins] r87483 - python/branches/py3k/Lib/test/test_concurrent_futures.py

brian.quinlan python-checkins at python.org
Sat Dec 25 01:18:29 CET 2010


Author: brian.quinlan
Date: Sat Dec 25 01:18:27 2010
New Revision: 87483
Log:
Assign closed handles to None to make errors more obvious if they are used.
Modified:
 python/branches/py3k/Lib/test/test_concurrent_futures.py
Modified: python/branches/py3k/Lib/test/test_concurrent_futures.py
==============================================================================
--- python/branches/py3k/Lib/test/test_concurrent_futures.py	(original)
+++ python/branches/py3k/Lib/test/test_concurrent_futures.py	Sat Dec 25 01:18:27 2010
@@ -125,6 +125,8 @@
 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 @@
 
 self.assertEqual(set([future1, future2]), finished)
 self.assertEqual(set(), pending)
-
-
 finally:
 call1.close()
 call2.close()


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /