File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -128,14 +128,14 @@ def pytest_runtestloop(self, session: Session) -> bool:
128128 count += 1
129129 total_time = self ._get_total_time (session )
130130
131- for index , item in enumerate (session .items , 1 ):
131+ for index , item in enumerate (session .items ):
132132 item : pytest .Item = item # noqa: PLW0127, PLW2901
133133 item ._report_sections .clear () # clear reports for new test # noqa: SLF001
134134
135135 if total_time > SHORTEST_AMOUNT_OF_TIME :
136136 item ._nodeid = self ._set_nodeid (item ._nodeid , count ) # noqa: SLF001
137137
138- next_item : pytest .Item = session .items [index ] if index < len (session .items ) else None
138+ next_item : pytest .Item = session .items [index + 1 ] if index + 1 < len (session .items ) else None
139139
140140 self ._clear_lru_caches (item )
141141
You can’t perform that action at this time.
0 commit comments