Skip to content

Commit

Permalink
Add testing for coverage.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed May 5, 2017
1 parent dc80693 commit 8341ac7
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .coveragerc
@@ -0,0 +1,6 @@
[run]
branch = True
source = DocumentTemplate

[report]
precision = 3
5 changes: 4 additions & 1 deletion .gitignore
Expand Up @@ -3,14 +3,17 @@ build
coverage
develop
dist
htmlcov
lib
parts

*.egg-info/
*.pyc
*.pyo
.coverage
.installed.cfg
.mr.developer.cfg
.tox
develop-eggs/
eggs/
*.egg-info/
coverage.xml
7 changes: 5 additions & 2 deletions .travis.yml
Expand Up @@ -6,12 +6,15 @@ python:
- 3.5
- 3.6
install:
- pip install -U setuptools==33.1.1
- pip install -U setuptools==33.1.1 coveralls coverage
- pip install zc.buildout
- buildout bootstrap
- buildout
script:
- bin/test -v1
- coverage run bin/test -v1
after_success:
- coverage combine
- coveralls
notifications:
email: false
cache:
Expand Down
24 changes: 22 additions & 2 deletions tox.ini
@@ -1,12 +1,32 @@
[tox]
envlist =
py27,py34,py35,py36
py27,
py34,
py35,
py36
coverage-report,

[testenv]
usedevelop = True
install_command = pip install --no-cache-dir --no-binary=:all: {opts} {packages}
commands =
zope-testrunner --test-path={envsitepackagesdir} -s DocumentTemplate -s TreeDisplay
coverage run {envbindir}/zope-testrunner --path=src --all {posargs:-vc} -s DocumentTemplate -s TreeDisplay
deps =
zope.testrunner
coverage
setenv =
PIP_NO_CACHE = 1
COVERAGE_FILE=.coverage.{envname}

[testenv:coverage-report]
basepython = python2.7
deps = coverage
setenv =
COVERAGE_FILE=.coverage
skip_install = true
commands =
coverage erase
coverage combine
coverage html
coverage xml
coverage report

0 comments on commit 8341ac7

Please sign in to comment.