Author: russellm Date: 2010-08-20 10:03:11 -0500 (Fri, 20 Aug 2010) New Revision: 13616
Modified: django/trunk/tests/runtests.py Log: Fixed #12574 -- Removed an unnecessary exception catch from the system runtest script, which could hide failing tests. Thanks to CarlFK for the report, and Ramiro Morales for the polish. Modified: django/trunk/tests/runtests.py =================================================================== --- django/trunk/tests/runtests.py 2010-08-20 14:29:57 UTC (rev 13615) +++ django/trunk/tests/runtests.py 2010-08-20 15:03:11 UTC (rev 13616) @@ -122,22 +122,19 @@ get_apps() # Load all the test model apps. + test_labels_set = set([label.split('.')[0] for label in test_labels]) for model_dir, model_name in get_test_models(): model_label = '.'.join([model_dir, model_name]) - try: - # if the model was named on the command line, or - # no models were named (i.e., run all), import - # this model and add it to the list to test. - if not test_labels or model_name in set([label.split('.')[0] for label in test_labels]): - if verbosity >= 2: - print "Importing model %s" % model_name - mod = load_app(model_label) - if mod: - if model_label not in settings.INSTALLED_APPS: - settings.INSTALLED_APPS.append(model_label) - except Exception, e: - sys.stderr.write("Error while importing %s:" % model_name + ''.join(traceback.format_exception(*sys.exc_info())[1:])) - continue + # if the model was named on the command line, or + # no models were named (i.e., run all), import + # this model and add it to the list to test. + if not test_labels or model_name in test_labels_set: + if verbosity >= 2: + print "Importing model %s" % model_name + mod = load_app(model_label) + if mod: + if model_label not in settings.INSTALLED_APPS: + settings.INSTALLED_APPS.append(model_label) # Add tests for invalid models. extra_tests = [] -- You received this message because you are subscribed to the Google Groups "Django updates" group. To post to this group, send email to django-upda...@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.