Skip to content

Commit

Permalink
fix: pytest-rerunfailures compatibility (#881)
Browse files Browse the repository at this point in the history
  • Loading branch information
noahnu authored Aug 23, 2024
1 parent 545da49 commit 16911ad
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/syrupy/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,10 @@ def ran_item(
self, nodeid: str, outcome: Literal["passed", "skipped", "failed"]
) -> None:
if nodeid in self._selected_items:
self._selected_items[nodeid] = ItemStatus(outcome)
try:
self._selected_items[nodeid] = ItemStatus(outcome)
except ValueError:
pass # if we don't understand the outcome, leave the item as "not run"

def finish(self) -> int:
exitstatus = 0
Expand Down

0 comments on commit 16911ad

Please sign in to comment.