]> granicus.if.org Git - python/commitdiff
Merged revisions 78536 via svnmerge from
authorGregory P. Smith <greg@mad-scientist.com>
Mon, 1 Mar 2010 03:11:09 +0000 (03:11 +0000)
committerGregory P. Smith <greg@mad-scientist.com>
Mon, 1 Mar 2010 03:11:09 +0000 (03:11 +0000)
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.
........

Lib/test/test_threading.py

index fe076b134f2663600cf0ae5675750d5d50d50899..054df7ba69b6a16adba7f8902aa6cb8c7d1923e7 100644 (file)
@@ -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