diff options
author | Raymond Hettinger <python@rcn.com> | 2009-06-04 00:11:54 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2009-06-04 00:11:54 (GMT) |
commit | 686057b8facb474a4542a2236f6ca2de7aa04cb5 (patch) | |
tree | ea013d9fa7c2f2d483be38493fd27c4e6d4aa191 /Lib/test/test_signal.py | |
parent | a678d94d589021363139182e1e8e2f58f319eed7 (diff) | |
download | cpython-686057b8facb474a4542a2236f6ca2de7aa04cb5.zip cpython-686057b8facb474a4542a2236f6ca2de7aa04cb5.tar.gz cpython-686057b8facb474a4542a2236f6ca2de7aa04cb5.tar.bz2 |
Use new form of with-statement instead of contextlib.nested().
Diffstat (limited to 'Lib/test/test_signal.py')
-rw-r--r-- | Lib/test/test_signal.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py index 570526c..786bb41 100644 --- a/Lib/test/test_signal.py +++ b/Lib/test/test_signal.py @@ -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 |