File: runtests.py

package info (click to toggle)
python-django-pyscss 1.0.3-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 256 kB
  • ctags: 98
  • sloc: python: 475; makefile: 30
file content (19 lines) | stat: -rw-r--r-- 516 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env python
import os
import sys
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "testproject.testproject.settings")

import django
if hasattr(django, 'setup'):
    django.setup()

from django.test.utils import get_runner
from django.conf import settings


def runtests():
    # Stolen from django/core/management/commands/test.py
    TestRunner = get_runner(settings)
    test_runner = TestRunner(verbosity=1, interactive=True)
    failures = test_runner.run_tests(['tests'])
    sys.exit(bool(failures))