Skip to content

Commit d100ac0

Browse files
Replacing pytest-cov by coverage (#218)
* Replaced pytest-cov by coverage * Update scripts/test Co-authored-by: Tom Christie <tom@tomchristie.com> Co-authored-by: Tom Christie <tom@tomchristie.com>
1 parent 4262a7c commit d100ac0

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ wheel==0.35.1
1818
anyio==2.0.2
1919
autoflake==1.4
2020
black==20.8b1
21+
coverage==5.3
2122
flake8==3.8.4
2223
flake8-bugbear==20.1.4
2324
flake8-pie==0.6.1
@@ -26,5 +27,4 @@ mypy==0.782
2627
pproxy==2.3.7
2728
pytest==6.1.1
2829
pytest-trio==0.6.0
29-
pytest-cov==2.10.1
3030
uvicorn==0.12.1

scripts/test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ if [ -z $GITHUB_ACTIONS ]; then
1111
scripts/check
1212
fi
1313

14-
${PREFIX}pytest $@
14+
${PREFIX}coverage run -m pytest
1515

1616
if [ -z $GITHUB_ACTIONS ]; then
1717
scripts/coverage

setup.cfg

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ known_third_party = brotli,certifi,chardet,cryptography,h11,h2,hstspreload,pytes
2020
skip = httpcore/_sync/,tests/sync_tests/
2121

2222
[tool:pytest]
23-
addopts = --cov-report= --cov=httpcore --cov=tests -rxXs
23+
addopts = -rxXs
2424
markers =
2525
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
26+
27+
[coverage:run]
28+
omit = venv/*
29+
include = httpcore/*, tests/*

0 commit comments

Comments
 (0)