homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author fdrake
Recipients dmi.baranov, docs@python, eli.bendersky, fdrake, serhiy.storchaka
Date 2013年05月28日.12:25:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1369743935.1.0.586954762302.issue17987@psf.upfronthosting.co.za>
In-reply-to
Content
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
pattern:
 with support.captured_stdin() as s:
 # Prepare simulated input:
 s.write('hello\n')
 s.seek(0)
 # Call test code that consumes from stdin:
 captured = input()
 self.assertEqual(captured, "hello")
History
Date User Action Args
2013年05月28日 12:25:35fdrakesetrecipients: + fdrake, eli.bendersky, docs@python, serhiy.storchaka, dmi.baranov
2013年05月28日 12:25:35fdrakesetmessageid: <1369743935.1.0.586954762302.issue17987@psf.upfronthosting.co.za>
2013年05月28日 12:25:35fdrakelinkissue17987 messages
2013年05月28日 12:25:34fdrakecreate

AltStyle によって変換されたページ (->オリジナル) /