Merge pull request #5116 from blueyed/cov-pytester

Minor coverage improvements for pytester
This commit is contained in:
Bruno Oliveira 2019-04-15 14:49:28 -03:00 committed by GitHub
commit df68808d29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -77,7 +77,7 @@ def pytest_configure(config):
def raise_on_kwargs(kwargs):
__tracebackhide__ = True
if kwargs:
if kwargs: # pragma: no branch
raise TypeError(
"Unexpected keyword arguments: {}".format(", ".join(sorted(kwargs)))
)
@ -312,7 +312,8 @@ class HookRecorder(object):
passed.append(rep)
elif rep.skipped:
skipped.append(rep)
elif rep.failed:
else:
assert rep.failed, "Unexpected outcome: {!r}".format(rep)
failed.append(rep)
return passed, skipped, failed