Skip to content

Commit

Permalink
Merge pull request #63 from kavdev/improvement/test_harness
Browse files Browse the repository at this point in the history
added test harness
  • Loading branch information
filipeximenes committed Dec 2, 2018
2 parents f75096d + faee1eb commit 996bd1a
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .coveragerc
@@ -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
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
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
@@ -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
@@ -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
@@ -0,0 +1,6 @@
[flake8]
max-line-length = 119
max-complexity = 12

[pycodestyle]
max-line-length = 119

0 comments on commit 996bd1a

Please sign in to comment.