#32532: Provide friendlier error if a file path is passed as a test label when
running tests
-------------------------------------+-------------------------------------
     Reporter:  Chris Jerdonek       |                    Owner:  Chris
         Type:                       |  Jerdonek
  Cleanup/optimization               |                   Status:  assigned
    Component:  Testing framework    |                  Version:  3.1
     Severity:  Normal               |               Resolution:
     Keywords:  DiscoverRunner,test  |             Triage Stage:  Accepted
  labels                             |
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by Chris Jerdonek):

 * easy:  1 => 0


Comment:

 With my posted patch, the new error will look like this:

 {{{
 $ ./runtests.py test_runner/tests.py
 Testing against Django installed in '.../django/django' with up to 8
 processes
 Traceback (most recent call last):
   ...
 RuntimeError: One of the test labels is a path to a file:
 'test_runner/tests.py'
 Test labels that are paths but not importable as names can only be
 directories.
 }}}

 (By the way, I unchecked "easy" because this wasn't necessarily so easy
 given that `is_discoverable()` had to be broken up to get the info needed
 for the patch.)

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

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.5b9f207c5b2fa7352d9c54900ca7e251%40djangoproject.com.

Reply via email to