Add coveragerc (#581)

This commit is contained in:
J. Nick Koston 2023-10-15 12:24:27 -10:00 committed by GitHub
parent 054e01dbb6
commit 5baef3881a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 1 deletions

17
.coveragerc Normal file
View File

@ -0,0 +1,17 @@
[report]
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover
# Don't complain about missing debug-only code:
def __repr__
# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError
raise exceptions.NotSupportedError
# TYPE_CHECKING and @overload blocks are never executed during pytest run
if TYPE_CHECKING:
@overload

View File

@ -86,7 +86,7 @@ jobs:
- run: mypy aioesphomeapi
name: Check typing with mypy
if: ${{ matrix.python-version == '3.11' && matrix.extension == 'skip_cython' }}
- run: pytest -vv --cov --cov-report=xml --tb=native tests
- run: pytest -vv --cov=aioesphomeapi --cov-report=xml --tb=native tests
name: Run tests with pytest
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3