[docs] [issue17987] test.support.captured_stderr, captured_stdin not documented

Dmi Baranov report at bugs.python.org
Mon May 27 20:51:11 CEST 2013

Dmi Baranov added the comment:

Yes, I agree that this is not an obvious sample, but:

$ ./python -m test.test_support | grep test_captured_stdin
test_captured_stdin (__main__.TestSupport) ... ok

What's about that?

with captured_stdin() as s:
    captured = input()

assert captured == 'hello'


Python tracker <report at bugs.python.org>

More information about the docs mailing list