Commits

Mikhail Korobov  committed 694eab7 Merge

Merge pull request #2 from charettes/discover-test-runner

Make sure to always use the default test runner.

  • Participants
  • Parent commits f99189a, ff1c385
  • Branches default

Comments (0)

Files changed (1)

File django_coverage/coverage_runner.py

 limitations under the License.
 
 """
-
 import os
 import sys
 
-try:
-    from django.test.simple import DjangoTestSuiteRunner
-except ImportError:
+import django
+
+if django.VERSION < (1, 2):
     msg = """
 
     django-coverage 1.1+ requires django 1.2+.
     """
     raise Exception(msg)
 
+from django.conf import global_settings
 from django.db.models import get_app, get_apps
 from django.test.utils import get_runner
 
 from django_coverage.utils.module_tools import get_all_modules
 
 
+DjangoTestSuiteRunner = get_runner(global_settings)
+
+
 class CoverageRunner(DjangoTestSuiteRunner):
     """
     Test runner which displays a code coverage report at the end of the run.