mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Use new form of with-statement instead of contextlib.nested().
This commit is contained in:
parent
a678d94d58
commit
686057b8fa
4 changed files with 11 additions and 12 deletions
|
@ -146,8 +146,8 @@ class InterProcessSignalTests(unittest.TestCase):
|
|||
# re-raises information about any exceptions the child
|
||||
# throws. The real work happens in self.run_test().
|
||||
os_done_r, os_done_w = os.pipe()
|
||||
with nested(closing(os.fdopen(os_done_r, 'rb')),
|
||||
closing(os.fdopen(os_done_w, 'wb'))) as (done_r, done_w):
|
||||
with closing(os.fdopen(os_done_r, 'rb')) as done_r, \
|
||||
closing(os.fdopen(os_done_w, 'wb')) as done_w:
|
||||
child = os.fork()
|
||||
if child == 0:
|
||||
# In the child process; run the test and report results
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue