diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2013-03-23 21:36:23 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2013-03-23 21:36:23 (GMT) |
commit | 93f756b274fb376d4c7fe589b1211acb49cea092 (patch) | |
tree | fc3008a9109de82462d4bcf57ac15003d0778cc4 /Lib | |
parent | a1b9ed32ee69c9204959d5db2475001d199b3e50 (diff) | |
parent | 656c80809c77511ed33bec9c7f6a9c09860f0116 (diff) | |
download | cpython-93f756b274fb376d4c7fe589b1211acb49cea092.zip cpython-93f756b274fb376d4c7fe589b1211acb49cea092.tar.gz cpython-93f756b274fb376d4c7fe589b1211acb49cea092.tar.bz2 |
Merge test_queue clean up from 3.2.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_queue.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/test/test_queue.py b/Lib/test/test_queue.py index 86ad9c0..2cdfee4 100644 --- a/Lib/test/test_queue.py +++ b/Lib/test/test_queue.py @@ -46,6 +46,9 @@ class _TriggerThread(threading.Thread): class BlockingTestMixin: + def tearDown(self): + self.t = None + def do_blocking_test(self, block_func, block_args, trigger_func, trigger_args): self.t = _TriggerThread(trigger_func, trigger_args) self.t.start() @@ -260,7 +263,7 @@ class FailingQueue(queue.Queue): raise FailingQueueException("You Lose") return queue.Queue._get(self) -class FailingQueueTest(unittest.TestCase, BlockingTestMixin): +class FailingQueueTest(BlockingTestMixin, unittest.TestCase): def failing_queue_test(self, q): if q.qsize(): |