diff options
author | Gregory P. Smith <greg@mad-scientist.com> | 2010-03-01 03:13:36 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@mad-scientist.com> | 2010-03-01 03:13:36 (GMT) |
commit | f50f168cf5a3e41ccaebcfb1de454ab846a109e6 (patch) | |
tree | 737f5ac825eb60f03caba9f0544de5df4cfe0f85 /Lib/test/test_threading.py | |
parent | af6d3b83fd765fb28ba431928b20495cd152f3c2 (diff) | |
download | cpython-f50f168cf5a3e41ccaebcfb1de454ab846a109e6.zip cpython-f50f168cf5a3e41ccaebcfb1de454ab846a109e6.tar.gz cpython-f50f168cf5a3e41ccaebcfb1de454ab846a109e6.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 9e540c2..ef718ec 100644 --- a/Lib/test/test_threading.py +++ b/Lib/test/test_threading.py @@ -255,14 +255,10 @@ class ThreadTests(BaseTestCase): threading._start_new_thread = fail_new_thread try: t = threading.Thread(target=lambda: None) - try: - t.start() - assert False - except threading.ThreadError: - self.assertFalse( - t in threading._limbo, - "Failed to cleanup _limbo map on failure of Thread.start()." - ) + self.assertRaises(threading.ThreadError, 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 |