From: cdeler Date: Thu, 8 Oct 2020 12:05:30 +0000 (+0300) Subject: Replacing pytest-cov by coverage (#1353) X-Git-Tag: 0.16.1~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=72a1f2c759d71f9f7b24e2c933640d58d2c78a5b;p=thirdparty%2Fhttpx.git Replacing pytest-cov by coverage (#1353) --- diff --git a/requirements.txt b/requirements.txt index ff046269..725811da 100644 --- a/requirements.txt +++ b/requirements.txt @@ -15,6 +15,7 @@ wheel # Tests & Linting autoflake black==20.8b1 +coverage==5.3 cryptography flake8 flake8-bugbear @@ -24,7 +25,6 @@ mypy pytest==5.* pytest-asyncio pytest-trio -pytest-cov trio trio-typing trustme diff --git a/scripts/test b/scripts/test index f9c99172..f7f32ad1 100755 --- a/scripts/test +++ b/scripts/test @@ -11,7 +11,7 @@ if [ -z $GITHUB_ACTIONS ]; then scripts/check fi -${PREFIX}pytest $@ +${PREFIX}coverage run -m pytest if [ -z $GITHUB_ACTIONS ]; then scripts/coverage diff --git a/setup.cfg b/setup.cfg index 0b8ef00b..c860d819 100644 --- a/setup.cfg +++ b/setup.cfg @@ -15,6 +15,10 @@ profile = black combine_as_imports = True [tool:pytest] -addopts = --cov=httpx --cov=tests -rxXs +addopts = -rxXs markers = copied_from(source, changes=None): mark test as copied from somewhere else, along with a description of changes made to accodomate e.g. our test setup + +[coverage:run] +omit = venv/* +include = httpx/*, tests/*