Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
django-basetheme-bootstrap
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Bryan BRANCOTTE
django-basetheme-bootstrap
Commits
3eb0a62b
Commit
3eb0a62b
authored
6 years ago
by
Bryan BRANCOTTE
Browse files
Options
Downloads
Patches
Plain Diff
fixing runtests
parent
232c4299
No related branches found
No related tags found
No related merge requests found
Pipeline
#10773
passed
6 years ago
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
runtests.py
+5
-18
5 additions, 18 deletions
runtests.py
setup.py
+20
-3
20 additions, 3 deletions
setup.py
with
25 additions
and
21 deletions
runtests.py
+
5
−
18
View file @
3eb0a62b
...
...
@@ -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
()
This diff is collapsed.
Click to expand it.
setup.py
+
20
−
3
View file @
3eb0a62b
...
...
@@ -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
'
,
],
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment