Index: tox.ini |
=================================================================== |
--- a/tox.ini |
+++ b/tox.ini |
@@ -1,25 +1,21 @@ |
[tox] |
-envlist = py27,py35,py36,pypy,coverage,flake8 |
+envlist = py27,py35,py36,pypy,flake8 |
[flake8] |
ignore = D107, N801, W503 |
[testenv] |
deps = |
- pytest |
- mock |
-commands = |
- py.test tests |
- |
-[testenv:coverage] |
-deps = |
pytest-cov |
mock |
commands = |
- py.test --cov=abp --cov-report=term-missing tests |
+ # For accurate coverage reports, we write a `pragma: no py{}` instruction |
+ # containing the current Python version to a .coveragerc file |
+ python -c 'import sys; open(".coveragerc", "w").write("[report]\nexclude_lines = pragma: no py\{\} cover".format(sys.version_info[0]))' |
+ py.test --cov=abp --cov-report=term-missing --cov-fail-under=100 tests |
-# We have to install our package in development mode |
-# so that pytest-cov can find the .coverage file. |
+# We have to install our package in development mode so that pytest-cov can |
+# find the .coverage and .coveragerc files. |
usedevelop = true |
[testenv:flake8] |