mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 03:41:05 -05:00
Use django.test.runner.DiscoverRunner on Django 1.6+
This commit is contained in:
11
runtests.py
11
runtests.py
@@ -24,11 +24,16 @@ settings.configure(
|
||||
)
|
||||
)
|
||||
|
||||
from django.test.simple import DjangoTestSuiteRunner
|
||||
|
||||
try:
|
||||
from django.test.runner import DiscoverRunner as TestRunner # Django 1.6+
|
||||
except ImportError:
|
||||
from django.test.simple import DjangoTestSuiteRunner as TestRunner # Django -1.5
|
||||
|
||||
|
||||
def runtests():
|
||||
test_runner = DjangoTestSuiteRunner(verbosity=1)
|
||||
failures = test_runner.run_tests([APP, ])
|
||||
test_runner = TestRunner(verbosity=1)
|
||||
failures = test_runner.run_tests([APP])
|
||||
sys.exit(failures)
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
Reference in New Issue
Block a user