From 27d608e5da4b045ea112823ec8d271add42fd89d Mon Sep 17 00:00:00 2001 From: Jason Moujaes Date: Sat, 3 Mar 2018 14:57:51 -0500 Subject: [PATCH] No need to handle version 1.7 Django anymore so removing those cases from runtests.py (#102) --- runtests.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/runtests.py b/runtests.py index 30afb39..3eef600 100755 --- a/runtests.py +++ b/runtests.py @@ -1,7 +1,10 @@ #!/usr/bin/env python import sys +import django from django.conf import settings +from django.test.runner import DiscoverRunner as TestRunner + SETTINGS = { 'DATABASES': { @@ -51,19 +54,10 @@ def runtests(*test_args): if not settings.configured: settings.configure(**SETTINGS) - # New Django 1.7 app registry setup - try: - from django import setup - setup() - except ImportError: - pass - - # New Django 1.8 test runner - try: - from django.test.runner import DiscoverRunner as TestRunner - except ImportError: - from django.test.simple import DjangoTestSuiteRunner as TestRunner + # app registry setup + django.setup() + # test runner test_runner = TestRunner(verbosity=1) failures = test_runner.run_tests(['dpaste']) if failures: