diff options
author | Gregory P. Smith <greg@mad-scientist.com> | 2010-03-01 03:11:09 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@mad-scientist.com> | 2010-03-01 03:11:09 (GMT) |
commit | c5e62796f9fbcfa4a5c172c7dd870102fd959d6b (patch) | |
tree | bab1c7e964e4bf51143aff7a6fe0577a6fcad9a8 /Lib/test/test_threading.py | |
parent | c234a3c74a3b4178027f2beff39dbe304450330b (diff) | |
download | cpython-c5e62796f9fbcfa4a5c172c7dd870102fd959d6b.zip cpython-c5e62796f9fbcfa4a5c172c7dd870102fd959d6b.tar.gz cpython-c5e62796f9fbcfa4a5c172c7dd870102fd959d6b.tar.bz2 |
Merged revisions 78536 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78536 | gregory.p.smith | 2010-02-28 19:09:19 -0800 (Sun, 28 Feb 2010) | 2 lines
Cleanup the test added in r78517 based on Ezio Melotti's feedback.
........
Diffstat (limited to 'Lib/test/test_threading.py')
-rw-r--r-- | Lib/test/test_threading.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py index fe076b1..054df7b 100644 --- a/Lib/test/test_threading.py +++ b/Lib/test/test_threading.py @@ -227,14 +227,10 @@ class ThreadTests(unittest.TestCase): 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 |