~widelands-dev/widelands-website/django_staticfiles

« back to all changes in this revision

Viewing changes to djangoratings/runtests.py

  • Committer: franku
  • Date: 2018-11-21 17:54:32 UTC
  • mfrom: (508.1.1 widelands)
  • Revision ID: somal@arcor.de-20181121175432-8rc3h0332xmgmma4
merged trunk, resolved conflicts

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:])