File: runtests.py

package info (click to toggle)
django-memoize 2.0.0%2Bdfsg-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 204 kB
  • ctags: 147
  • sloc: python: 640; makefile: 114
file content (18 lines) | stat: -rw-r--r-- 444 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env python
import os
import sys

os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.test_settings'

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

if __name__ == "__main__":
    if hasattr(django, 'setup'):
        django.setup()
        
    TestRunner = get_runner(settings)
    test_runner = TestRunner(verbosity=2)
    failures = test_runner.run_tests(["tests"])
    sys.exit(bool(failures))