PageRenderTime 81ms CodeModel.GetById 60ms app.highlight 2ms RepoModel.GetById 18ms app.codeStats 0ms

/tests/runtests.py

http://django-pagination.googlecode.com/
Python | 16 lines | 14 code | 1 blank | 1 comment | 0 complexity | 0d884991149157ae7342c5eeb6658e33 MD5 | raw file
 1import sys
 2sys.path.append('..')
 3
 4import os
 5# Make a backup of DJANGO_SETTINGS_MODULE environment variable to restore later.
 6backup = os.environ.get('DJANGO_SETTINGS_MODULE', '')
 7os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
 8
 9from django.test.simple import run_tests
10
11if __name__ == "__main__":
12    failures = run_tests(['pagination',], verbosity=9)
13    if failures:
14        sys.exit(failures)
15    # Reset the DJANGO_SETTINGS_MODULE to what it was before running tests.
16    os.environ['DJANGO_SETTINGS_MODULE'] = backup