mirror of
https://github.com/nikdoof/django-eveigb.git
synced 2025-12-17 11:39:21 +00:00
Update to make setup.py tests work.
This commit is contained in:
1
setup.py
1
setup.py
@@ -13,4 +13,5 @@ setup(name="django-eveigb",
|
||||
keywords="eveonline django igb",
|
||||
packages=['eveigb'],
|
||||
install_requires=['Django>=1.4'],
|
||||
test_suite='test_project.tests.runtests',
|
||||
)
|
||||
|
||||
17
test_project/tests.py
Normal file
17
test_project/tests.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# This file mainly exists to allow python setup.py test to work.
|
||||
import os, sys
|
||||
os.environ['DJANGO_SETTINGS_MODULE'] = 'test_project.settings'
|
||||
test_dir = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))),'..')
|
||||
sys.path.insert(0, test_dir)
|
||||
|
||||
from django.test.utils import get_runner
|
||||
from django.conf import settings
|
||||
|
||||
def runtests():
|
||||
TestRunner = get_runner(settings)
|
||||
test_runner = TestRunner(verbosity=1, interactive=True)
|
||||
failures = test_runner.run_tests(['eveigb'])
|
||||
sys.exit(bool(failures))
|
||||
|
||||
if __name__ == '__main__':
|
||||
runtests()
|
||||
Reference in New Issue
Block a user