[1.0.X] Fixed #9031 -- Clarified the error message when the label used to run a specific test case method doesn't name a valid test case class. Thanks to Thomas Guettler for the suggestion and patch.
Merge of r9879 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@9880 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
3c48d866f6
commit
ef66773cef
@ -97,6 +97,8 @@ def build_test(label):
|
|||||||
except TypeError:
|
except TypeError:
|
||||||
raise ValueError("Test label '%s' does not refer to a test class" % label)
|
raise ValueError("Test label '%s' does not refer to a test class" % label)
|
||||||
else: # label is app.TestClass.test_method
|
else: # label is app.TestClass.test_method
|
||||||
|
if not TestClass:
|
||||||
|
raise ValueError("Test label '%s' does not refer to a test class" % label)
|
||||||
return TestClass(parts[2])
|
return TestClass(parts[2])
|
||||||
|
|
||||||
def run_tests(test_labels, verbosity=1, interactive=True, extra_tests=[]):
|
def run_tests(test_labels, verbosity=1, interactive=True, extra_tests=[]):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user