Django

Code

Show
Ignore:
Timestamp:
06/06/08 07:55:38 (3 months ago)
Author:
russellm
Message:

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.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/tests/runtests.py

    r6934 r7576  
    119119 
    120120    # Load all the test model apps. 
    121     test_models = [] 
    122121    for model_dir, model_name in get_test_models(): 
    123122        model_label = '.'.join([model_dir, model_name]) 
     
    143142        if not test_labels or model_name in test_labels: 
    144143            extra_tests.append(InvalidModelTestCase(model_label)) 
    145  
     144            try: 
     145                # Invalid models are not working apps, so we cannot pass them into  
     146                # the test runner with the other test_labels 
     147                test_labels.remove(model_name) 
     148            except ValueError: 
     149                pass 
     150     
    146151    # Run the test suite, including the extra validation tests. 
    147152    from django.test.simple import run_tests