[Python-checkins] r73471 - python/trunk/Lib/test/test_signal.py
georg.brandl
python-checkins at python.org
Fri Jun 19 00:24:26 CEST 2009
Author: georg.brandl
Date: Fri Jun 19 00:24:26 2009
New Revision: 73471
Log:
#6276: Remove usage of nested() in favor of new with statement with multiple managers.
Modified:
python/trunk/Lib/test/test_signal.py
Modified: python/trunk/Lib/test/test_signal.py
==============================================================================
--- python/trunk/Lib/test/test_signal.py (original)
+++ python/trunk/Lib/test/test_signal.py Fri Jun 19 00:24:26 2009
@@ -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 @@
# 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
More information about the Python-checkins
mailing list