Skip to content

Commit

Permalink
Add tox config incl. flake8 and coverage.
Browse files Browse the repository at this point in the history
flake8 currently fails.
  • Loading branch information
Michael Howitz committed Jun 18, 2018
1 parent bc1012d commit 44bd40e
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 8 deletions.
6 changes: 6 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[run]
branch = True
source = src

[report]
precision = 2
19 changes: 11 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
bin/
eggs/
develop-eggs/
parts/
.installed.cfg
*.egg-info/
*.py[co]
.coverage
.installed.cfg
.tox/
__pycache__/
bin/
build/
coverage.xml
develop-eggs/
dist/
*.egg-info/
.tox/
TEST_THIS_REST_BEFORE_REGISTERING.txt
eggs/
parts/
flake8/
htmlcov/
42 changes: 42 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[tox]
envlist =
py27,
py35,
py36,
flake8,
coverage

[testenv]
commands =
{envbindir}/buildout -c {toxinidir}/buildout.cfg buildout:directory={envdir} buildout:develop={toxinidir} bootstrap
{envbindir}/buildout -c {toxinidir}/buildout.cfg buildout:directory={envdir} buildout:develop={toxinidir} install test
coverage run {envbindir}/test {posargs:-cv}
skip_install = true
deps =
setuptools==33.1.1
zc.buildout
coverage
setenv =
COVERAGE_FILE=.coverage.{envname}

[testenv:coverage]
basepython = python3.6
skip_install = true
deps = coverage
setenv =
COVERAGE_FILE=.coverage
commands =
coverage erase
coverage combine
coverage html
coverage xml
coverage report --fail-under=93

[testenv:flake8]
basepython = python3.6
deps =
flake8
flake8-html
flake8-debugger
commands =
flake8 --format=html --htmldir={toxinidir}/flake8 --doctests src tests setup.py {posargs}

0 comments on commit 44bd40e

Please sign in to comment.