mirror of
https://github.com/QingdaoU/Spirit.git
synced 2024-12-29 07:51:56 +00:00
test runner
This commit is contained in:
parent
db53d2ab86
commit
074d9b2756
@ -7,4 +7,4 @@ install:
|
||||
- pip install -r requirements.txt --use-mirrors
|
||||
|
||||
script:
|
||||
- "python manage.py test spirit.tests"
|
||||
- "python setup.py test"
|
2
example/settings_test_runner.py
Normal file
2
example/settings_test_runner.py
Normal file
@ -0,0 +1,2 @@
|
||||
from settings import *
|
||||
from local_settings_sample import *
|
18
run_tests.py
Normal file
18
run_tests.py
Normal file
@ -0,0 +1,18 @@
|
||||
#-*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
import sys
|
||||
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = 'example.settings_test_runner'
|
||||
|
||||
from django.test.runner import DiscoverRunner
|
||||
|
||||
|
||||
def run_tests():
|
||||
test_runner = DiscoverRunner()
|
||||
failures = test_runner.run_tests(["spirit", ])
|
||||
sys.exit(failures)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
run_tests()
|
Loading…
Reference in New Issue
Block a user