mirror of
https://github.com/python/cpython.git
synced 2025-07-30 14:44:10 +00:00
Don't invoke reload(sys) and use StringIO objects instead of real files to capture stdin and stdout when needed (ensures all sys attributes remain unmodified after test_xmlrpc runs)
This commit is contained in:
parent
7df72dcdf9
commit
8c1ffeb614
2 changed files with 36 additions and 45 deletions
|
@ -659,6 +659,9 @@ def captured_output(stream_name):
|
|||
def captured_stdout():
|
||||
return captured_output("stdout")
|
||||
|
||||
def captured_stdin():
|
||||
return captured_output("stdin")
|
||||
|
||||
def gc_collect():
|
||||
"""Force as many objects as possible to be collected.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue