843a5a5f583c724c3898d9d453bb7aeb7a8537bf
[django-pagination.git] / fnp_django_pagination / tests / runner.py
1 #!/usr/bin/env python
2
3 import django
4 import os
5 import sys
6
7 from django.core.management import call_command
8
9
10 def runtests():
11     os.environ['DJANGO_SETTINGS_MODULE'] = 'fnp_django_pagination.tests.settings'
12
13     try:
14         django.setup()
15     except AttributeError:  # for Django 1.6 compatible
16         pass
17
18     failures = call_command('test', 'fnp_django_pagination')
19     sys.exit(bool(failures))
20
21 if __name__ == '__main__':
22     runtests()