django-test-extensions
django-test-extensions copied to clipboard
ImportError: cannot import name run_tests
I've installed the app and when I tried python manage.py test --coverage I got the following error:
ImportError: cannot import name run_tests
It seems the cause of the problem is at this file: https://github.com/garethr/django-test-extensions/blob/master/src/test_extensions/testrunners/codecoverage.py
from django.test.simple import run_tests as django_test_runner
Apparently django doesn't have run_tests function anymore. Instead they encapsulated it with DjangoTestSuiteRunner class.
It'd be great if anyone fix this. Btw, I use Django 1.5
Yes you should use DjangoTestSuiteRunner
from django.test.simple import DjangoTestSuiteRunner test_runner = DjangoTestSuiteRunner(verbosity=1) test_runner.run_tests(...........)