mirror of
https://github.com/jazzband/django-ddp.git
synced 2026-04-19 14:40:59 +00:00
Add test runner for use with python setup.py test
This commit is contained in:
parent
0109f3372d
commit
b521317c77
1 changed files with 17 additions and 0 deletions
|
|
@ -0,0 +1,17 @@
|
|||
# This file mainly exists to allow `python setup.py test` to work.
|
||||
import os
|
||||
import sys
|
||||
|
||||
import dddp
|
||||
import django
|
||||
from django.test.utils import get_runner
|
||||
from django.conf import settings
|
||||
|
||||
|
||||
def run_tests():
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = 'dddp.test.test_project.settings'
|
||||
dddp.greenify()
|
||||
django.setup()
|
||||
test_runner = get_runner(settings)()
|
||||
failures = test_runner.run_tests(['dddp'])
|
||||
sys.exit(bool(failures))
|
||||
Loading…
Reference in a new issue