Use pytest to generate coverage
This commit is contained in:
parent
ad6d3bbd90
commit
0db705e68a
2 changed files with 4 additions and 3 deletions
4
.github/workflows/python-package.yml
vendored
4
.github/workflows/python-package.yml
vendored
|
@ -33,6 +33,6 @@ jobs:
|
||||||
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||||
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
||||||
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
||||||
- name: Test with unittest
|
- name: Test with pytest
|
||||||
run: |
|
run: |
|
||||||
python3.10 -m unittest discover tests
|
python3.10 -m pytest --cov=calculator tests/
|
||||||
|
|
|
@ -5,7 +5,8 @@ cache:
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- python -V
|
- python -V
|
||||||
|
- python -m pip install --upgrade pytest pytest-cov
|
||||||
|
|
||||||
tests:
|
tests:
|
||||||
script:
|
script:
|
||||||
- python -m unittest discover tests
|
- python -m pytest --cov=calculator tests/
|
||||||
|
|
Loading…
Add table
Reference in a new issue