1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-30 17:21:21 +00:00

chore(core): silence false alarms in coverage report

[no changelog]
This commit is contained in:
grdddj 2023-03-08 16:34:05 +01:00 committed by Jiří Musil
parent d4fbd4a95d
commit a1663de771
2 changed files with 17 additions and 0 deletions

13
core/.coveragerc Normal file
View File

@ -0,0 +1,13 @@
[report]
# Regexes for lines to exclude from consideration
exclude_lines =
from typing import
if TYPE_CHECKING:
# local const variables, e.g. _FIELD_TYPE_VL = const(7)
^_.*const\(\d+
assert False
pass
raise RuntimeError
raise NotImplementedError
def mem_dump
def __repr__(self)

View File

@ -28,10 +28,14 @@ fi
EXCLUDES="\ EXCLUDES="\
src/all_modules.py,\ src/all_modules.py,\
src/typing.py,\
src/apps/ethereum/tokens.py,\ src/apps/ethereum/tokens.py,\
src/apps/webauthn/knownapps.py,\
src/apps/common/coininfo.py,\
src/trezor/messages.py,\ src/trezor/messages.py,\
src/trezor/enums/__init__.py" src/trezor/enums/__init__.py"
# Uses core/.coveragerc configuration file
coverage html \ coverage html \
--omit="$EXCLUDES" \ --omit="$EXCLUDES" \
--fail-under=${COVERAGE_THRESHOLD} --fail-under=${COVERAGE_THRESHOLD}