Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fixed #6168 -- Updated the Django system test runner to make it possi…

…ble to run the invalid_models test (and any other invalid_ test) explicitly, rather than just as part of the full suite. Thanks for tracking down the problem, Eric Florenzano.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent ed1c211 commit d234e92740ed6c144f222f15afe33c49fb49d7b7 @freakboy3742 freakboy3742 committed
Showing with 7 additions and 2 deletions.
  1. +7 −2 tests/
9 tests/
@@ -118,7 +118,6 @@ def django_tests(verbosity, interactive, test_labels):
# Load all the test model apps.
- test_models = []
for model_dir, model_name in get_test_models():
model_label = '.'.join([model_dir, model_name])
@@ -142,7 +141,13 @@ def django_tests(verbosity, interactive, test_labels):
model_label = '.'.join([model_dir, model_name])
if not test_labels or model_name in test_labels:
+ try:
+ # Invalid models are not working apps, so we cannot pass them into
+ # the test runner with the other test_labels
+ test_labels.remove(model_name)
+ except ValueError:
+ pass
# Run the test suite, including the extra validation tests.
from django.test.simple import run_tests
failures = run_tests(test_labels, verbosity=verbosity, interactive=interactive, extra_tests=extra_tests)

0 comments on commit d234e92

Please sign in to comment.
Something went wrong with that request. Please try again.