Skip to content

Commit

Permalink
Update for Django 1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
paltman committed Jul 11, 2014
1 parent b7cda1a commit 8936da7
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions runtests.py
Expand Up @@ -35,14 +35,19 @@ def runtests(*test_args):
if hasattr(django, "setup"):
django.setup()

if not test_args:
test_args = ["tests"]

parent = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, parent)

from django.test.simple import DjangoTestSuiteRunner
failures = DjangoTestSuiteRunner(
try:
from django.test.runner import DiscoverRunner
runner_class = DiscoverRunner
test_args = ["kaleo.tests"]
except ImportError:
from django.test.simple import DjangoTestSuiteRunner
runner_class = DjangoTestSuiteRunner
test_args = ["tests"]

failures = runner_class(
verbosity=1, interactive=True, failfast=False).run_tests(test_args)
sys.exit(failures)

Expand Down

0 comments on commit 8936da7

Please sign in to comment.