Commit 3eb0a62b authored by Bryan  BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

fixing runtests

parent 232c4299
Pipeline #10773 passed with stage
in 30 seconds
......@@ -4,32 +4,19 @@ import sys
import django
from django.conf import settings
from django.core.cache import cache
from django.test.utils import get_runner
def runtests():
def run_tests():
test_dir = os.path.dirname(__file__)
sys.path.insert(0, test_dir)
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings'
django.setup()
TestRunner = get_runner(settings)
test_runner = TestRunner()
# failures = test_runner.run_tests(["basetheme_bootstrap.tests.SignUpTestsUserPrefDown"], verbosity=1, interactive=True)
failures = test_runner.run_tests([], verbosity=1, interactive=True)
if bool(failures):
print(failures)
sys.exit(1)
# def run_all_tests():
# os.environ['BASETHEME_BOOTSTRAP_USER_PREFERENCE_MODEL_ENABLED'] = str(True)
# runtests()
# os.environ['BASETHEME_BOOTSTRAP_USER_PREFERENCE_MODEL_ENABLED'] = str(False)
# runtests()
#
# sys.exit(0)
test_runner = TestRunner(verbosity=1, interactive=True)
failures = test_runner.run_tests([])
sys.exit(bool(failures))
if __name__ == '__main__':
runtests()
run_tests()
......@@ -18,13 +18,30 @@ setup(
'django-crispy-forms'
],
license="BSD",
test_suite="runtests.run_all_tests",
package_data= {'basetheme_bootstrap' : [
test_suite="runtests.run_tests",
package_data={'basetheme_bootstrap': [
"templatetags/*",
"templates/basetheme_bootstrap/*",
"templates/registration/*",
"templates/*",
"static/css/*",
"static/js/*",
] },
]},
classifiers=[
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Framework :: Django',
'Framework :: Django :: 1.11',
'Framework :: Django :: 2.0',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Topic :: Utilities',
],
)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment