summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2010-03-01 03:09:19 (GMT)
committerGregory P. Smith <greg@mad-scientist.com>2010-03-01 03:09:19 (GMT)
commit3c1586ab45c2eb867e6c110128632191cdb51be6 (patch)
treef016164e18036e04a1bedab6c13f8182b5128c68 /Lib/test
parentc1baf4ac9ee17bbd2433533cd246db5d96bad015 (diff)
downloadcpython-3c1586ab45c2eb867e6c110128632191cdb51be6.zip
cpython-3c1586ab45c2eb867e6c110128632191cdb51be6.tar.gz
cpython-3c1586ab45c2eb867e6c110128632191cdb51be6.tar.bz2
Cleanup the test added in r78517 based on Ezio Melotti's feedback.
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_threading.py12
1 files changed, 4 insertions, 8 deletions
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py
index defa9ee..70dd026 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