Opened 10 years ago

Closed 10 years ago

Last modified 8 years ago

#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 Carl Meyer, 10 years ago

Resolution: wontfix
Status: newclosed

Django uses the built-in unittest library of Python, and the test output is entirely handled by unittest. 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.

comment:2 by Areski Belaid, 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:3 by Philipp Metzler, 10 years ago

created an issue here: http://bugs.python.org/issue22431

comment:4 by Tim Graham, 8 years ago

Following duplicate ticket #27255, a django-developers thread proposes to reopen this issue.

comment:5 by Chris Jerdonek, 8 years ago

Cc: chris.jerdonek@… added
Note: See TracTickets for help on using tickets.
Back to Top