Opened 2 years ago

Closed 2 years ago

Last modified 2 years ago

#23332 closed Cleanup/optimization (wontfix)

Change format of test runner output

Reported by: googol7 Owned by: nobody
Component: Testing framework Version: 1.5
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


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 (3)

comment:1 Changed 2 years ago by carljm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to wontfix
  • Status changed from new to closed

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 Changed 2 years ago by areski

I think you could achieve this by hacking the
Here an example of testrunner adding color:

My guess would be to use the same hack around TestResult to change the output format.

comment:3 Changed 2 years ago by googol7

created an issue here:

Note: See TracTickets for help on using tickets.
Back to Top