Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: cannot import name run_tests #27

Open
laplacesdemon opened this issue Mar 20, 2013 · 1 comment
Open

ImportError: cannot import name run_tests #27

laplacesdemon opened this issue Mar 20, 2013 · 1 comment

Comments

@laplacesdemon
Copy link

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

@0xbepresent
Copy link

Yes you should use DjangoTestSuiteRunner

from django.test.simple import DjangoTestSuiteRunner
test_runner = DjangoTestSuiteRunner(verbosity=1)
test_runner.run_tests(...........)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants