-
Notifications
You must be signed in to change notification settings - Fork 1
/
run_tests.py
executable file
·44 lines (37 loc) · 1.11 KB
/
run_tests.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env python
import os
import sys
import django
from django.conf import settings
from django.test.utils import get_runner
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
def root(*x):
return os.path.join(BASE_DIR, *x)
if not settings.configured:
settings.configure(
DEBUG=True,
DATABASES={
"default": {
"ENGINE": "django.contrib.gis.db.backends.postgis",
"NAME": "test",
"USER": "postgres",
"PASSWORD": "",
"HOST": "localhost",
"PORT": "",
},
"other": {
"ENGINE": "django.contrib.gis.db.backends.postgis",
"NAME": "test_other",
"USER": "postgres",
"PASSWORD": "",
"HOST": "localhost",
"PORT": "",
},
},
INSTALLED_APPS=("uk_geo_utils",),
)
django.setup()
TestRunner = get_runner(settings)
test_runner = TestRunner(verbosity=1, interactive=True, failfast=False)
failures = test_runner.run_tests(["uk_geo_utils"])
sys.exit(failures)