Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try out coverage instead of pytest-cov #2665

Merged
merged 22 commits into from
Jun 28, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,15 @@ else
INSTALLDIR=$(python -c "import os, trio; print(os.path.dirname(trio.__file__))")
cp ../pyproject.toml $INSTALLDIR

if pytest -r a -p trio._tests.pytest_plugin --junitxml=../test-results.xml --run-slow ${INSTALLDIR} --cov="$INSTALLDIR" --cov-report=xml --cov-config=../.coveragerc --verbose; then
if coverage run --rcfile=../.coveragerc -m pytest -r a -p trio._tests.pytest_plugin --junitxml=../test-results.xml --run-slow ${INSTALLDIR} --verbose; then
PASSED=true
else
PASSED=false
fi

coverage report -m --rcfile ../.coveragerc --data-file ./.coverage*
coverage xml --rcfile ../.coveragerc --data-file ./.coverage*

# Remove the LSP again; again we want to do this ASAP to avoid
# accidentally breaking other stuff.
if [ "$LSP" != "" ]; then
Expand Down
2 changes: 1 addition & 1 deletion test-requirements.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# For tests
pytest >= 5.0 # for faulthandler in core
pytest-cov >= 2.6.0
coverage >= 7.2.5
async_generator >= 1.9
pyright
# ipython 7.x is the last major version supporting Python 3.7
Expand Down
9 changes: 2 additions & 7 deletions test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ click==8.1.3
# via
# black
# pip-tools
coverage[toml]==7.2.7
# via pytest-cov
coverage==7.2.7
# via -r test-requirements.in
cryptography==39.0.2
# via
# -r test-requirements.in
Expand Down Expand Up @@ -121,10 +121,6 @@ pyproject-hooks==1.0.0
pyright==1.1.310
# via -r test-requirements.in
pytest==7.3.1
# via
# -r test-requirements.in
# pytest-cov
pytest-cov==4.1.0
# via -r test-requirements.in
sniffio==1.3.0
# via -r test-requirements.in
Expand All @@ -134,7 +130,6 @@ tomli==2.0.1
# via
# black
# build
# coverage
# mypy
# pylint
# pytest
Expand Down