~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to djangoratings/runtests.py

  • Committer: franku
  • Date: 2018-11-18 17:03:56 UTC
  • mto: (508.1.1 widelands)
  • mto: This revision was merged to the branch mainline in revision 510.
  • Revision ID: somal@arcor.de-20181118170356-n9g0g4uv7o0sofa4
cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/usr/bin/env python
2
 
import sys
3
 
 
4
 
from os.path import dirname, abspath
5
 
 
6
 
from django.conf import settings
7
 
 
8
 
if not settings.configured:
9
 
    settings.configure(
10
 
        DATABASE_ENGINE='sqlite3',
11
 
        INSTALLED_APPS=[
12
 
            'django.contrib.auth',
13
 
            'django.contrib.contenttypes',
14
 
            'djangoratings',
15
 
        ]
16
 
    )
17
 
 
18
 
from django.test.simple import run_tests
19
 
 
20
 
 
21
 
def runtests(*test_args):
22
 
    if not test_args:
23
 
        test_args = ['djangoratings']
24
 
    parent = dirname(abspath(__file__))
25
 
    sys.path.insert(0, parent)
26
 
    failures = run_tests(test_args, verbosity=1, interactive=True)
27
 
    sys.exit(failures)
28
 
 
29
 
 
30
 
if __name__ == '__main__':
31
 
    runtests(*sys.argv[1:])