Skip to content

Commit

Permalink
Use pytest-cov to support coverage under pytest-xdist
Browse files Browse the repository at this point in the history
Also push the configuration into a config file for reproducibility.
  • Loading branch information
PeterJCLaw committed Oct 26, 2023
1 parent 5845828 commit 3302687
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[run]
branch = True
include = asttokens/*
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:

- name: Test with pytest
run: |
coverage run --branch --include='asttokens/*' -m pytest -n auto --junitxml=./rspec.xml
pytest --cov -n auto --junitxml=./rspec.xml
coverage report -m
- name: Collect coverage results
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ test =
astroid >=1, <2; python_version < "3"
astroid >=2, <4; python_version >= "3"
pytest
pytest-cov
pytest-xdist

[options.package_data]
Expand Down

0 comments on commit 3302687

Please sign in to comment.