diff options
| author | Samuele Pedroni <pedronis@openend.se> | 2003-05-17 12:50:33 (GMT) |
|---|---|---|
| committer | Samuele Pedroni <pedronis@openend.se> | 2003-05-17 12:50:33 (GMT) |
| commit | 0ea0a1866952c0423589382bb33c5da170b1d093 (patch) | |
| tree | 054e83567d2bbf9e9177fa543651757fbb7e41d0 /Lib | |
| parent | e163df1bceae344428afdee7baa39eb4529634d6 (diff) | |
| download | cpython-0ea0a1866952c0423589382bb33c5da170b1d093.zip cpython-0ea0a1866952c0423589382bb33c5da170b1d093.tar.gz cpython-0ea0a1866952c0423589382bb33c5da170b1d093.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.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_codeop.py b/Lib/test/test_codeop.py index b98989a..b9e7e26 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) } |
