A context managers that temporarily replaces the named stream with io.StringIO object.
test.support/captured_stdin
captured_stdin