Skip to content

Commit f3dbe5a

Browse files
committed
pytester: listoutcomes: assert instead of implicit if
1 parent 1da8ce6 commit f3dbe5a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/_pytest/pytester.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,8 @@ def listoutcomes(self):
312312
passed.append(rep)
313313
elif rep.skipped:
314314
skipped.append(rep)
315-
elif rep.failed:
315+
else:
316+
assert rep.failed, "Unexpected outcome: {!r}".format(rep)
316317
failed.append(rep)
317318
return passed, skipped, failed
318319

0 commit comments

Comments
 (0)