mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Cleanup the test added in r78517 based on Ezio Melotti's feedback.
This commit is contained in:
parent
c1baf4ac9e
commit
3c1586ab45
1 changed files with 4 additions and 8 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue