Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 39 lines (30 sloc) 0.93 kb
7ef7b02 @coleifer Small cleanup in generic_aggregation for simpler testing
authored
1 #!/usr/bin/env python
2 import sys
3 from os.path import dirname, abspath
4
5 from django.conf import settings
6
b8cb7d9 @coleifer Allow running with postgres
authored
7 if len(sys.argv) > 1 and 'postgres' in sys.argv:
8 sys.argv.remove('postgres')
9 db_engine = 'postgresql_psycopg2'
10 db_name = 'test_main'
11 else:
12 db_engine = 'sqlite3'
13 db_name = ''
14
7ef7b02 @coleifer Small cleanup in generic_aggregation for simpler testing
authored
15 if not settings.configured:
16 settings.configure(
b8cb7d9 @coleifer Allow running with postgres
authored
17 DATABASE_ENGINE = db_engine,
18 DATABASE_NAME = db_name,
7ef7b02 @coleifer Small cleanup in generic_aggregation for simpler testing
authored
19 INSTALLED_APPS = [
20 'django.contrib.contenttypes',
21 'generic_aggregation.generic_aggregation_tests',
22 ],
23 )
24
25 from django.test.simple import run_tests
26
27
28 def runtests(*test_args):
29 if not test_args:
30 test_args = ['generic_aggregation_tests']
31 parent = dirname(abspath(__file__))
32 sys.path.insert(0, parent)
33 failures = run_tests(test_args, verbosity=1, interactive=True)
34 sys.exit(failures)
35
36
37 if __name__ == '__main__':
38 runtests(*sys.argv[1:])
Something went wrong with that request. Please try again.