mirror of
https://github.com/jazzband/django-constance.git
synced 2026-03-16 22:40:24 +00:00
Fixed: test runner
This commit is contained in:
parent
64bef7d88b
commit
d833536f48
3 changed files with 8 additions and 5 deletions
2
setup.py
2
setup.py
|
|
@ -33,6 +33,6 @@ setup(
|
||||||
],
|
],
|
||||||
packages=find_packages(exclude=['tests']),
|
packages=find_packages(exclude=['tests']),
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
test_suite='tests.runtests.runtests',
|
test_suite='tests.runtests.main',
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
0
tests/__init__.py
Normal file
0
tests/__init__.py
Normal file
11
tests/runtests.py
Normal file → Executable file
11
tests/runtests.py
Normal file → Executable file
|
|
@ -1,20 +1,23 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
"""Borrowed from Carl Meyer's django-adminfiles."""
|
"""Borrowed from Carl Meyer's django-adminfiles."""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
parent = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
currentdir = os.path.dirname(os.path.abspath(__file__))
|
||||||
sys.path.insert(0, parent)
|
parentdir = os.path.dirname(currentdir)
|
||||||
|
sys.path.insert(0, parentdir)
|
||||||
|
sys.path.insert(0, currentdir)
|
||||||
|
|
||||||
os.environ['DJANGO_SETTINGS_MODULE'] = 'testproject.settings'
|
os.environ['DJANGO_SETTINGS_MODULE'] = 'testproject.settings'
|
||||||
|
|
||||||
from django.test.simple import run_tests
|
from django.test.simple import run_tests
|
||||||
|
|
||||||
|
|
||||||
def runtests():
|
def main():
|
||||||
failures = run_tests(['test_app'], verbosity=1, interactive=True)
|
failures = run_tests(['test_app'], verbosity=1, interactive=True)
|
||||||
sys.exit(failures)
|
sys.exit(failures)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
runtests()
|
main()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue