Merge pull request #5116 from blueyed/cov-pytester
Minor coverage improvements for pytester
This commit is contained in:
commit
df68808d29
|
@ -77,7 +77,7 @@ def pytest_configure(config):
|
||||||
|
|
||||||
def raise_on_kwargs(kwargs):
|
def raise_on_kwargs(kwargs):
|
||||||
__tracebackhide__ = True
|
__tracebackhide__ = True
|
||||||
if kwargs:
|
if kwargs: # pragma: no branch
|
||||||
raise TypeError(
|
raise TypeError(
|
||||||
"Unexpected keyword arguments: {}".format(", ".join(sorted(kwargs)))
|
"Unexpected keyword arguments: {}".format(", ".join(sorted(kwargs)))
|
||||||
)
|
)
|
||||||
|
@ -312,7 +312,8 @@ class HookRecorder(object):
|
||||||
passed.append(rep)
|
passed.append(rep)
|
||||||
elif rep.skipped:
|
elif rep.skipped:
|
||||||
skipped.append(rep)
|
skipped.append(rep)
|
||||||
elif rep.failed:
|
else:
|
||||||
|
assert rep.failed, "Unexpected outcome: {!r}".format(rep)
|
||||||
failed.append(rep)
|
failed.append(rep)
|
||||||
return passed, skipped, failed
|
return passed, skipped, failed
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue