mirror of
https://github.com/python/cpython.git
synced 2025-12-01 07:19:24 +00:00
#6276: Remove usage of nested() in favor of new with statement with multiple managers.
This commit is contained in:
parent
7c2bc8308c
commit
c29863e3a6
1 changed files with 3 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
||||||
import unittest
|
import unittest
|
||||||
from test import test_support
|
from test import test_support
|
||||||
from contextlib import closing, nested
|
from contextlib import closing
|
||||||
import gc
|
import gc
|
||||||
import pickle
|
import pickle
|
||||||
import select
|
import select
|
||||||
|
|
@ -146,8 +146,8 @@ class InterProcessSignalTests(unittest.TestCase):
|
||||||
# re-raises information about any exceptions the child
|
# re-raises information about any exceptions the child
|
||||||
# throws. The real work happens in self.run_test().
|
# throws. The real work happens in self.run_test().
|
||||||
os_done_r, os_done_w = os.pipe()
|
os_done_r, os_done_w = os.pipe()
|
||||||
with nested(closing(os.fdopen(os_done_r)),
|
with closing(os.fdopen(os_done_r)) as done_r, \
|
||||||
closing(os.fdopen(os_done_w, 'w'))) as (done_r, done_w):
|
closing(os.fdopen(os_done_w, 'w')) as done_w:
|
||||||
child = os.fork()
|
child = os.fork()
|
||||||
if child == 0:
|
if child == 0:
|
||||||
# In the child process; run the test and report results
|
# In the child process; run the test and report results
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue