Merge branch 'master' into django-1.8

This commit is contained in:
Alex Seeholzer 2015-06-12 15:31:12 +02:00
commit ca9d7bc5c4

View File

@ -93,14 +93,27 @@ class QuickDjangoTest(object):
STATIC_URL = '/static/' STATIC_URL = '/static/'
) )
try:
# Django <= 1.8
from django.test.simple import DjangoTestSuiteRunner
test_runner = DjangoTestSuiteRunner(verbosity=1)
except ImportError:
# Django >= 1.8
from django.test.runner import DiscoverRunner
test_runner = DiscoverRunner(verbosity=1)
if django.VERSION >= (1, 7): if django.VERSION >= (1, 7):
django.setup() django.setup()
from django.test.simple import DjangoTestSuiteRunner failures = test_runner.run_tests(self.apps)
failures = DjangoTestSuiteRunner().run_tests(self.apps, verbosity=1)
if failures: if failures:
sys.exit(failures) sys.exit(failures)
# from django.test.simple import DjangoTestSuiteRunner
# failures = DjangoTestSuiteRunner().run_tests(self.apps, verbosity=1)
# if failures:
# sys.exit(failures)
if __name__ == '__main__': if __name__ == '__main__':
""" """
What do when the user hits this file from the shell. What do when the user hits this file from the shell.