[Django] #23332: Change format of test runner output

10 views
Skip to first unread message

Django

unread,
Aug 21, 2014, 7:02:52 AM8/21/14
to django-...@googlegroups.com
#23332: Change format of test runner output
--------------------------------------+--------------------
Reporter: googol7 | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Testing framework | Version: 1.5
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+--------------------
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 .?

--
Ticket URL: <https://code.djangoproject.com/ticket/23332>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Aug 21, 2014, 7:45:47 AM8/21/14
to django-...@googlegroups.com
#23332: Change format of test runner output
-------------------------------------+-------------------------------------
Reporter: googol7 | Owner: nobody
Type: | Status: closed
Cleanup/optimization | Version: 1.5
Component: Testing framework | Resolution: wontfix
Severity: Normal | Triage Stage:
Keywords: | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by carljm):

* status: new => closed
* needs_docs: => 0
* resolution: => wontfix
* needs_tests: => 0
* needs_better_patch: => 0


Comment:

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/23332#comment:1>

Django

unread,
Aug 21, 2014, 8:15:02 AM8/21/14
to django-...@googlegroups.com
#23332: Change format of test runner output
-------------------------------------+-------------------------------------
Reporter: googol7 | Owner: nobody

Type: | Status: closed
Cleanup/optimization | Version: 1.5
Component: Testing framework | Resolution: wontfix
Severity: Normal | Triage Stage:
Keywords: | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by areski):

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/23332#comment:2>

Django

unread,
Sep 17, 2014, 10:14:10 AM9/17/14
to django-...@googlegroups.com
#23332: Change format of test runner output
-------------------------------------+-------------------------------------
Reporter: googol7 | Owner: nobody

Type: | Status: closed
Cleanup/optimization | Version: 1.5
Component: Testing framework | Resolution: wontfix
Severity: Normal | Triage Stage:
Keywords: | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by googol7):

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

--
Ticket URL: <https://code.djangoproject.com/ticket/23332#comment:3>

Django

unread,
Sep 20, 2016, 8:43:51 PM9/20/16
to django-...@googlegroups.com
#23332: Change format of test runner output
-------------------------------------+-------------------------------------
Reporter: Philipp Metzler | Owner: nobody
Type: | Status: closed
Cleanup/optimization |

Component: Testing framework | Version: 1.5
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage:
| Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham):

Following duplicate ticket #27255, a [https://groups.google.com/d/topic
/django-developers/6nyN2PkpZik/discussion django-developers thread]
proposes to reopen this issue.

--
Ticket URL: <https://code.djangoproject.com/ticket/23332#comment:4>

Django

unread,
Oct 3, 2016, 12:23:26 PM10/3/16
to django-...@googlegroups.com
#23332: Change format of test runner output
-------------------------------------+-------------------------------------
Reporter: Philipp Metzler | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Testing framework | Version: 1.5
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage:
| Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Chris Jerdonek):

* cc: chris.jerdonek@… (added)


--
Ticket URL: <https://code.djangoproject.com/ticket/23332#comment:5>

Reply all
Reply to author
Forward
0 new messages