msg227000 - (view) |
Author: Philipp Metzler (googol) |
Date: 2014-09-17 13:44 |
Can I change the test runner output format to main.tests.tests.TimeSlotTestCase.test_creation ... ERROR instead of test_creation (main.tests.tests.TimeSlotTestCase) ... ERROR so that I can easily just copy&paste that line and run the test again without having to remove the brackets () and having to copy the name of the test behind the class and add a .? |
|
|
msg227001 - (view) |
Author: R. David Murray (r.david.murray) *  |
Date: 2014-09-17 13:58 |
I remember this feature being requested before (I vote +1 myself :), and I believe I recall a conversation involving Michael Foord where he approved it in principle, but I can't find an open issue for it. As a new feature it can only go into 3.5, and would presumably need to be controlled by an option somewhere to preserve backward compatibility with things that parse unittest output. If you want to work on a patch that would be welcome. |
|
|
msg230801 - (view) |
Author: Robert Collins (rbcollins) *  |
Date: 2014-11-07 12:34 |
I don't consider the console output of unittest to be a stable interface. Michael - do you? Things that want to process unittest should be using the API. |
|
|
msg230802 - (view) |
Author: Antoine Pitrou (pitrou) *  |
Date: 2014-11-07 12:39 |
I agree with Robert. However, since software authors' wishes can clearly be diverse here, perhaps there should be a simple way for them to customize the output? |
|
|
msg230957 - (view) |
Author: Michael Foord (michael.foord) *  |
Date: 2014-11-10 11:59 |
I agree with Robert that the text output of the default runner should not be considered a part of the "api" that we make backwards compatible guarantees about. People who want to customise that should be customising the text runner/result. (Unfortunately it requires tinkering with both at the moment.) |
|
|
msg231100 - (view) |
Author: Robert Collins (rbcollins) *  |
Date: 2014-11-13 10:21 |
Yes, making customising the output easier is a good thing. One way is to use e.g. subunit.run (which can work with all unittest versions since 2.6) and write a custom filter. Or a custom TestResult and TextTestRunner can work too :) |
|
|
msg277081 - (view) |
Author: Tim Graham (Tim.Graham) * |
Date: 2016-09-21 00:20 |
Is there opposition to changing the default output as outlined in the first comment? If so, then I think this ticket should be closed or retitled to reflect the intent. |
|
|
msg277082 - (view) |
Author: Tim Graham (Tim.Graham) * |
Date: 2016-09-21 00:23 |
Here's the patch if we make the change in Django instead: https://github.com/cjerdonek/django/commit/9c8d162f3f616e9d9768659a06fcf27bb389214b |
|
|
msg277083 - (view) |
Author: R. David Murray (r.david.murray) *  |
Date: 2016-09-21 00:43 |
My understanding of the comments is that the change to the default is OK (in a feature release, at least). |
|
|
msg277084 - (view) |
Author: Robert Collins (rbcollins) *  |
Date: 2016-09-21 01:03 |
+1 to changing the UI for 3.7 - just noting that if you're machine processing the output, the TUI isn't an appropriate channel. |
|
|