runners.py 573 B

1234567891011121314
  1. from django.conf import settings
  2. from django.test.simple import run_tests as django_test_runner
  3. def run_tests(test_labels, verbosity=1, interactive=True, extra_tests=None,
  4. **kwargs):
  5. """ Test runner that only runs tests for the apps
  6. listed in ``settings.TEST_APPS``.
  7. """
  8. extra_tests = extra_tests or []
  9. app_labels = getattr(settings, "TEST_APPS", test_labels)
  10. return django_test_runner(app_labels,
  11. verbosity=verbosity, interactive=interactive,
  12. extra_tests=extra_tests, **kwargs)