[issue24249] unittest API for detecting test failure in cleanup/teardown

2020-01-28 Thread Joseph Gordon
Change by Joseph Gordon : -- nosy: -josephgordon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[issue24249] unittest API for detecting test failure in cleanup/teardown

2015-12-13 Thread Joseph Gordon
Changes by Joseph Gordon : -- nosy: +josephgordon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue24249] unittest API for detecting test failure in cleanup/teardown

2015-09-08 Thread Adam
Changes by Adam : -- nosy: +azsorkin ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/ma

[issue24249] unittest API for detecting test failure in cleanup/teardown

2015-07-13 Thread Robert Collins
Robert Collins added the comment: Setting some basic design parameters here. Its ok for a test to know if it itself has decided on some status. See e.g. testtools.expectThat for a related design thing. Making some official API within the test itself so code after the failure can take appropri

[issue24249] unittest API for detecting test failure in cleanup/teardown

2015-05-20 Thread R. David Murray
R. David Murray added the comment: Having to specify a command line option to get a normally clean test run just doesn't feel like a good API. If there is a way to set that on the TestCase, that would be OK. There are other reasons to want the API I suggest, though...there is at least one St

[issue24249] unittest API for detecting test failure in cleanup/teardown

2015-05-20 Thread Martin Panter
Martin Panter added the comment: Ah sorry I didn’t see the keyword “subprocess”, so --buffer won’t work! But maybe you can dump the subprocess’s stderr to sys.stderr? -- ___ Python tracker

[issue24249] unittest API for detecting test failure in cleanup/teardown

2015-05-20 Thread Martin Panter
Martin Panter added the comment: Can’t you use the -b or --buffer command-line option , or equivalent option to unittest.main() or whatever? The standard output and standard error streams are buffered during the test run.

[issue24249] unittest API for detecting test failure in cleanup/teardown

2015-05-20 Thread R. David Murray
New submission from R. David Murray: I have a situation where it would be really helpful to know in my cleanup routine whether or not the test failed. The situation is this: I'm running a command in a subprocess, and sometimes it writes output to stderr that I normally want to ignore. But if