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 José Luis Segura Lucas
Recipients José Luis Segura Lucas
Date 2019-04-17.14:24:21
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1555511062.15.0.629417801049.issue36647@roundup.psfhosted.org>
In-reply-to
Content
When using "buffer = True" in a TextTestRunner, the test result behaviour doesn't change at all.

This is because TextTestRunner.stream is initialised using a decorator (_WritelnDecorator). When "buffer" is passed, the TestResult base class will try to redirect the stdout and stderr to 2 different io.StringIO objects. As the TextTestRunner.stream is initialised before that "redirection", all the "self.stream.write" calls will end using the original stream (stderr by default), and resulting in not buffering at all.
History
Date User Action Args
2019-04-17 14:24:22José Luis Segura Lucassetrecipients: + José Luis Segura Lucas
2019-04-17 14:24:22José Luis Segura Lucassetmessageid: <1555511062.15.0.629417801049.issue36647@roundup.psfhosted.org>
2019-04-17 14:24:22José Luis Segura Lucaslinkissue36647 messages
2019-04-17 14:24:21José Luis Segura Lucascreate