mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #16714: use 'raise' exceptions, don't 'throw'.
Patch by Serhiy Storchaka.
This commit is contained in:
commit
a191959849
42 changed files with 64 additions and 64 deletions
|
@ -104,7 +104,7 @@ class InterProcessSignalTests(unittest.TestCase):
|
|||
# This wait should be interrupted by the signal's exception.
|
||||
self.wait(child)
|
||||
time.sleep(1) # Give the signal time to be delivered.
|
||||
self.fail('HandlerBCalled exception not thrown')
|
||||
self.fail('HandlerBCalled exception not raised')
|
||||
except HandlerBCalled:
|
||||
self.assertTrue(self.b_called)
|
||||
self.assertFalse(self.a_called)
|
||||
|
@ -140,7 +140,7 @@ class InterProcessSignalTests(unittest.TestCase):
|
|||
# test-running process from all the signals. It then
|
||||
# communicates with that child process over a pipe and
|
||||
# re-raises information about any exceptions the child
|
||||
# throws. The real work happens in self.run_test().
|
||||
# raises. The real work happens in self.run_test().
|
||||
os_done_r, os_done_w = os.pipe()
|
||||
with closing(os.fdopen(os_done_r, 'rb')) as done_r, \
|
||||
closing(os.fdopen(os_done_w, 'wb')) as done_w:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue