From 6740fb106d209eaae05a7c7760ba297a430597ea Mon Sep 17 00:00:00 2001 From: John Vandenberg Date: Thu, 27 Feb 2020 10:40:13 +0700 Subject: [PATCH] tox.ini: Default to fail coverage under 95% Allow 65% coverage only on Python 3.4 where lxml is not being installed. Related to https://github.com/jayvdb/https-everywhere-py/issues/16 --- .cirrus.yml | 1 + tox.ini | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 38c0aa8..9dac87e 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -21,6 +21,7 @@ Linux_task: script: - python --version - PY=$(python3 -c 'import sys; print("%d%d" % (sys.version_info[0], sys.version_info[1]))') + - if [[ $PY == 34 ]]; then export COV_FAIL_UNDER=65; fi - python -m tox -e py$PY - bash <(curl -s https://codecov.io/bash) diff --git a/tox.ini b/tox.ini index 5e47d75..907da62 100644 --- a/tox.ini +++ b/tox.ini @@ -4,6 +4,8 @@ skip_missing_interpreters = true [testenv] usedevelop = true +passenv = + COV_FAIL_UNDER deps = py34: colorama!=0.4.2 . @@ -16,4 +18,4 @@ deps = tldextract regex commands = - pytest --cov=https_everywhere --maxfail=5 -rs + pytest --cov=https_everywhere --cov-fail-under={COV_FAIL_UNDER:95} --maxfail=5 -rs