Exclude solitary line from coverage
It's silly, because Python 3.5 and onwards allows coverage.py to detect this but otherwise our test coverage will fail.
This commit is contained in:
parent
2cdfd8ed33
commit
2723538095
|
@ -1,4 +1,5 @@
|
|||
[report]
|
||||
exclude_lines =
|
||||
.* # Python \d.*
|
||||
.* # nocov: Python \d.*
|
||||
fail_under = 100
|
||||
|
|
|
@ -415,7 +415,10 @@ def ensure_components_are_valid(uri, validated_components):
|
|||
if component in _SUBAUTHORITY_VALIDATORS:
|
||||
if not subauthority_component_is_valid(uri, component):
|
||||
invalid_components.add(component)
|
||||
continue
|
||||
# Python's peephole optimizer means that while this continue *is*
|
||||
# actually executed, coverage.py cannot detect that. See also,
|
||||
# https://bitbucket.org/ned/coveragepy/issues/198/continue-marked-as-not-covered
|
||||
continue # nocov: Python 2.7, 3.3, 3.4
|
||||
|
||||
validator = _COMPONENT_VALIDATORS[component]
|
||||
if not validator(getattr(uri, component)):
|
||||
|
|
Loading…
Reference in New Issue