Commit d234e927 authored by Russell Keith-Magee's avatar Russell Keith-Magee
Browse files

Fixed #6168 -- Updated the Django system test runner to make it possible to...

Fixed #6168 -- Updated the Django system test runner to make it possible 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: http://code.djangoproject.com/svn/django/trunk@7576 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent ed1c2117
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -118,7 +118,6 @@ def django_tests(verbosity, interactive, test_labels):
    get_apps()

    # Load all the test model apps.
    test_models = []
    for model_dir, model_name in get_test_models():
        model_label = '.'.join([model_dir, model_name])
        try:
@@ -142,6 +141,12 @@ def django_tests(verbosity, interactive, test_labels):
        model_label = '.'.join([model_dir, model_name])
        if not test_labels or model_name in test_labels:
            extra_tests.append(InvalidModelTestCase(model_label))
            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