summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorSamuele Pedroni <pedronis@openend.se>2003-05-17 12:51:10 (GMT)
committerSamuele Pedroni <pedronis@openend.se>2003-05-17 12:51:10 (GMT)
commit72c5c77ce17b5b1dbe23a10bc801d1169cf94d92 (patch)
treee273519750c8f71b118f8fec235f082b7e8a8719 /Lib
parenta98924a063b6c8f94f7a03c78bd83e6131954381 (diff)
downloadcpython-72c5c77ce17b5b1dbe23a10bc801d1169cf94d92.zip
cpython-72c5c77ce17b5b1dbe23a10bc801d1169cf94d92.tar.gz
cpython-72c5c77ce17b5b1dbe23a10bc801d1169cf94d92.tar.bz2
minor fix, jython-only. Don't asssume stdout to save is the ur-stdout.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_codeop.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_codeop.py b/Lib/test/test_codeop.py
index c2f8539..630af49 100644
--- a/Lib/test/test_codeop.py
+++ b/Lib/test/test_codeop.py
@@ -26,12 +26,13 @@ class CodeopTests(unittest.TestCase):
self.assert_(code)
if symbol == "single":
d,r = {},{}
+ saved_stdout = sys.stdout
sys.stdout = cStringIO.StringIO()
try:
exec code in d
exec compile(str,"<input>","single") in r
finally:
- sys.stdout = sys.__stdout__
+ sys.stdout = saved_stdout
elif symbol == 'eval':
ctx = {'a': 2}
d = { 'value': eval(code,ctx) }