def test_nullstreams(self): stream = StringIO.StringIO() null_streams([stream, sys.stdout]) stream.write('ok') sys.stdout.write('ok')
def silent_output(): null_streams([sys.stdout, sys.stderr, sys.stdin]) os.setsid() # Run the subprocess in a new session.