From 3c1586ab45c2eb867e6c110128632191cdb51be6 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Mon, 1 Mar 2010 03:09:19 +0000 Subject: [PATCH] Cleanup the test added in r78517 based on Ezio Melotti's feedback. --- Lib/test/test_threading.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py index defa9ee0f9a..70dd026a90c 100644 --- a/Lib/test/test_threading.py +++ b/Lib/test/test_threading.py @@ -257,14 +257,10 @@ class ThreadTests(BaseTestCase): threading._start_new_thread = fail_new_thread try: t = threading.Thread(target=lambda: None) - try: - t.start() - assert False - except thread.error: - self.assertFalse( - t in threading._limbo, - "Failed to cleanup _limbo map on failure of Thread.start()." - ) + self.assertRaises(thread.error, t.start) + self.assertFalse( + t in threading._limbo, + "Failed to cleanup _limbo map on failure of Thread.start().") finally: threading._start_new_thread = _start_new_thread