#23332 closed Cleanup/optimization (wontfix)
Change format of test runner output
Reported by: | Philipp Metzler | Owned by: | nobody |
---|---|---|---|
Component: | Testing framework | Version: | 1.5 |
Severity: | Normal | Keywords: | |
Cc: | chris.jerdonek@… | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
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 .?
Change History (5)
comment:1 by , 10 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
comment:2 by , 10 years ago
I think you could achieve this by hacking the https://docs.python.org/2/library/unittest.html#unittest.TestResult
Here an example of testrunner adding color: https://github.com/stevematney/redgreenunittests
My guess would be to use the same hack around TestResult to change the output format.
comment:4 by , 8 years ago
Following duplicate ticket #27255, a django-developers thread proposes to reopen this issue.
comment:5 by , 8 years ago
Cc: | added |
---|
Django uses the built-in
unittest
library of Python, and the test output is entirely handled byunittest
. So there is nothing in Django which could be changed to modify this output. The feature request seems reasonable to me, but it would need to be pursued as a change in the Python standard library.