Skip to content

Commit 88ed6e1

Browse files
committed
Update pytest_plugin.py
1 parent 652e98e commit 88ed6e1

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

codeflash/verification/pytest_plugin.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ def pytest_runtestloop(self, session: Session) -> bool:
137137
item._nodeid = self._set_nodeid(item._nodeid, count)
138138

139139
next_item: pytest.Item = session.items[index + 1] if index + 1 < len(session.items) else None
140+
141+
self._clear_lru_caches(item)
142+
140143
item.config.hook.pytest_runtest_protocol(item=item, nextitem=next_item)
141144
if session.shouldfail:
142145
raise session.Failed(session.shouldfail)
@@ -199,6 +202,7 @@ def _clear_cache_for_object(obj: Any) -> None: # noqa: ANN401
199202
pass
200203
except Exception: # noqa: BLE001, S110
201204
pass
205+
202206
def _set_nodeid(self, nodeid: str, count: int) -> str:
203207
"""Set loop count when using duration.
204208

0 commit comments

Comments
 (0)