pytester: listoutcomes: assert instead of implicit if

This commit is contained in:
Daniel Hahler 2019-04-14 22:58:41 +02:00
parent 1da8ce65a6
commit f3dbe5a308
1 changed files with 2 additions and 1 deletions

View File

@ -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