Skip to content

Commit 16911ad

Browse files
authored
fix: pytest-rerunfailures compatibility (#881)
1 parent 545da49 commit 16911ad

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/syrupy/session.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,10 @@ def ran_item(
122122
self, nodeid: str, outcome: Literal["passed", "skipped", "failed"]
123123
) -> None:
124124
if nodeid in self._selected_items:
125-
self._selected_items[nodeid] = ItemStatus(outcome)
125+
try:
126+
self._selected_items[nodeid] = ItemStatus(outcome)
127+
except ValueError:
128+
pass # if we don't understand the outcome, leave the item as "not run"
126129

127130
def finish(self) -> int:
128131
exitstatus = 0

0 commit comments

Comments
 (0)