Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added test harness #63

Merged
merged 2 commits into from
Dec 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[run]

branch = True
parallel = True
concurrency=multiprocessing
source = ./rolepermissions

omit =
*tests/*
*__init__*

[report]
skip_covered = True

[html]
directory = cover
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ pip-log.txt
.tox
nosetests.xml
htmlcov
cover/

# Translations
*.mo
Expand All @@ -35,6 +36,7 @@ htmlcov
.mr.developer.cfg
.project
.pydevproject
.settings/

# Complexity
output/*.html
Expand Down
4 changes: 4 additions & 0 deletions manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
import sys

if __name__ == "__main__":
import coverage
coverage.process_startup()
os.environ["COVERAGE_PROCESS_START"] = ".coveragerc"

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "testsettings")

from django.core.management import execute_from_command_line
Expand Down
4 changes: 4 additions & 0 deletions requirements_test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
django>=1.10.6
coverage>=4.3.4
flake8>=3.3.0
model-mommy>=1.3.2
7 changes: 7 additions & 0 deletions run_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
DJANGO_SETTINGS_MODULE="testsettings" coverage run manage.py test --parallel=6
printf "\n"
coverage combine
coverage report
coverage html
printf "\n"
flake8
6 changes: 6 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[flake8]
max-line-length = 119
max-complexity = 12

[pycodestyle]
max-line-length = 119