Skip to content

Commit

Permalink
Merge pull request #372 from mattbennett/branch-coverage
Browse files Browse the repository at this point in the history
add branch coverage as an allowed failure
  • Loading branch information
mattbennett committed Oct 28, 2016
2 parents 4f80099 + dc1c237 commit 7809578
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[run]
concurrency = eventlet
parallel = true
branch = ${BRANCH}
data_file = /tmp/.coverage
source =
nameko
Expand Down
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ env:
- TOX_ENV=py34-pinned-lib
- TOX_ENV=py34-latest-lib
- TOX_ENV=py34-mastereventlet-lib
- TOX_ENV=py34-branchcoverage-lib
- TOX_ENV=py34-examples
- TOX_ENV=docs

Expand All @@ -39,6 +40,7 @@ matrix:
- env: TOX_ENV=py27-mastereventlet-lib
- env: TOX_ENV=py33-mastereventlet-lib
- env: TOX_ENV=py34-mastereventlet-lib
- env: TOX_ENV=py34-branchcoverage-lib

script:
- tox -e $TOX_ENV
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.PHONY: test docs

ENABLE_BRANCH_COVERAGE ?= 0

test: flake8 pylint test_lib test_examples

flake8:
Expand All @@ -9,10 +11,10 @@ pylint:
pylint --rcfile=pylintrc nameko -E

test_lib:
py.test test --cov --cov-config=$(CURDIR)/.coveragerc
BRANCH=$(ENABLE_BRANCH_COVERAGE) py.test test --cov --cov-config=$(CURDIR)/.coveragerc

test_examples:
py.test docs/examples/test --cov=docs/examples
BRANCH=$(ENABLE_BRANCH_COVERAGE) py.test docs/examples/test --cov=docs/examples --cov-config=$(CURDIR)/.coveragerc
py.test docs/examples/testing

test_docs: docs spelling #linkcheck
Expand Down
6 changes: 5 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = {py27,py33,py34}-{oldest,pinned,latest,mastereventlet}-lib, py34-examples, docs
envlist = {py27,py33,py34}-{oldest,pinned,latest,mastereventlet}-lib, py34-branchcoverage-lib, py34-examples, docs
skipsdist = True

[testenv]
Expand All @@ -25,6 +25,10 @@ deps =
pinned: six==1.9.0
pinned: werkzeug==0.9.6

setenv =
branchcoverage: ENABLE_BRANCH_COVERAGE=1
examples: ENABLE_BRANCH_COVERAGE=1

whitelist_externals = make

commands =
Expand Down

0 comments on commit 7809578

Please sign in to comment.