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:
Nick Coghlan 2009-10-17 15:09:41 +00:00
parent 7df72dcdf9
commit 8c1ffeb614
2 changed files with 36 additions and 45 deletions

View file

@ -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.