From 16911ad0541c642118f3f1ac2d1347362d80c854 Mon Sep 17 00:00:00 2001 From: Noah Date: Fri, 23 Aug 2024 00:47:26 -0400 Subject: [PATCH] fix: pytest-rerunfailures compatibility (#881) --- src/syrupy/session.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/syrupy/session.py b/src/syrupy/session.py index 9ec6aca1..fcb28a1a 100644 --- a/src/syrupy/session.py +++ b/src/syrupy/session.py @@ -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