Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#13025 closed (wontfix)

Test runner should print failed test path in format that is accepted by `manage.py test ...`

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

Description

When I run all test and some of them fail I see

FAIL: "test_function_name (projectname.appname.tests.TestCaseName)".

Now when I want to run this single test (which happens very often) I need to manualy compose parameter for manage.py test like this:

manage.py test appname.TestCaseName.test_function_name

It would be handy if test runner printed failed test path, that can be directly used for manage.py test:

FAIL: test_function_name (appname.TestCaseName.test_function_name)

Change History (2)

comment:1 Changed 5 years ago by russellm

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

I'm going to close this wontfix - I can see what you're driving at, but there is a legitimate use for having the full class there - so you can actually find the test definition. This is also helpful if the test class names are ambiguous.

Composing the actual test name isn't that hard once you have the full class name, so I'd rather stick to the fully qualified name.

comment:2 Changed 5 years ago by zimnyx

Got your point - finding test is easier having full path, which is obviously true, but why test runner takes incompatible argument appname.TestCaseName.test_function_name? Wouldn't it be more convenient for test runner to take param like projectname.appname.tests.TestCaseName.test_function_name? Pasting text is better than manually writing, because you avoid typos ans save precious time.

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