mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
give the threading API PEP 8 names
This commit is contained in:
parent
32c2e41c82
commit
0fbcf69455
20 changed files with 127 additions and 126 deletions
|
@ -49,11 +49,11 @@ class BlockingTestMixin:
|
|||
self.t.start()
|
||||
self.result = block_func(*block_args)
|
||||
# If block_func returned before our thread made the call, we failed!
|
||||
if not self.t.startedEvent.isSet():
|
||||
if not self.t.startedEvent.is_set():
|
||||
self.fail("blocking function '%r' appeared not to block" %
|
||||
block_func)
|
||||
self.t.join(10) # make sure the thread terminates
|
||||
if self.t.isAlive():
|
||||
if self.t.is_alive():
|
||||
self.fail("trigger function '%r' appeared to not return" %
|
||||
trigger_func)
|
||||
return self.result
|
||||
|
@ -73,10 +73,10 @@ class BlockingTestMixin:
|
|||
expected_exception_class)
|
||||
finally:
|
||||
self.t.join(10) # make sure the thread terminates
|
||||
if self.t.isAlive():
|
||||
if self.t.is_alive():
|
||||
self.fail("trigger function '%r' appeared to not return" %
|
||||
trigger_func)
|
||||
if not self.t.startedEvent.isSet():
|
||||
if not self.t.startedEvent.is_set():
|
||||
self.fail("trigger thread ended but event never set")
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue