Fix test coverage reporting

Related #1097
This commit is contained in:
MattHag 2024-09-19 00:36:33 +02:00 committed by Peter F. Patel-Schneider
parent 26667afea4
commit c1bc39f99f
3 changed files with 22 additions and 2 deletions

20
.coveragerc Normal file
View File

@ -0,0 +1,20 @@
[run]
branch = True
source =
hid_parser
hidapi
keysms
logitech_receiver
solaar
omit =
*/tests/*
*/setup.py
*/__main__.py
[report]
exclude_lines =
pragma: no cover
if __name__ == '__main__':
if typing.TYPE_CHECKING

View File

@ -55,4 +55,4 @@ jobs:
make install_pip PIP_ARGS='.["test"]'
- name: Run tests on macOS
run: |
export DYLD_LIBRARY_PATH=$(brew --prefix hidapi)/lib:$DYLD_LIBRARY_PATH && pytest --cov=lib/ tests/
export DYLD_LIBRARY_PATH=$(brew --prefix hidapi)/lib:$DYLD_LIBRARY_PATH && pytest --cov

View File

@ -66,4 +66,4 @@ lint:
test:
@echo "Running Solaar tests"
pytest --cov=lib/ tests/
pytest --cov