mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-25 09:37:37 +00:00
don't count overage for AssertionErrors
A common pattern in sans-io is to essentially match on all variants of an enum, and then have a `else: raise AssertionError` in the end. This increases robustness as we spot incomplete coverage instead of silently passing. However, it makes no sense to explicitly test these asserts.
This commit is contained in:
parent
1e5464a9e6
commit
15270dfaf0
@ -17,7 +17,8 @@ omit = *contrib*, *tnetstring*, *platform*, *main.py
|
|||||||
show_missing = True
|
show_missing = True
|
||||||
exclude_lines =
|
exclude_lines =
|
||||||
pragma: no cover
|
pragma: no cover
|
||||||
raise NotImplementedError()
|
raise NotImplementedError
|
||||||
|
raise AssertionError
|
||||||
if typing.TYPE_CHECKING:
|
if typing.TYPE_CHECKING:
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
@overload
|
@overload
|
||||||
|
Loading…
Reference in New Issue
Block a user