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

Fred L. Drake, Jr. report at bugs.python.org
Tue May 28 14:25:35 CEST 2013

Fred L. Drake, Jr. added the comment:

Joining the documentation for captured_stderr and captured_stdout makes
sense, as they can really use a single example, and the usage is
completely parallel.

I'd rather see captured_stdin handled separately, perhaps with some
additional comments in the example, to emphasize the intended usage

     with support.captured_stdin() as s:
         # Prepare simulated input:
         # Call test code that consumes from stdin:
         captured = input()
     self.assertEqual(captured, "hello")


Python tracker <report at bugs.python.org>

More information about the docs mailing list