]> granicus.if.org Git - python/commitdiff
#6276: Remove usage of nested() in favor of new with statement with multiple managers.
authorGeorg Brandl <georg@python.org>
Thu, 18 Jun 2009 22:24:26 +0000 (22:24 +0000)
committerGeorg Brandl <georg@python.org>
Thu, 18 Jun 2009 22:24:26 +0000 (22:24 +0000)
Lib/test/test_signal.py

index ff5c173ea99bd5c1f7097b3dda015ff7a20b11a9..21577db76aacfb9ef0aeca0631c6fc9bd598b1f9 100644 (file)
@@ -1,6 +1,6 @@
 import unittest
 from test import test_support
-from contextlib import closing, nested
+from contextlib import closing
 import gc
 import pickle
 import select
@@ -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)),
-                    closing(os.fdopen(os_done_w, 'w'))) as (done_r, done_w):
+        with closing(os.fdopen(os_done_r)) as done_r, \
+             closing(os.fdopen(os_done_w, 'w')) as done_w:
             child = os.fork()
             if child == 0:
                 # In the child process; run the test and report results