Skip to content

Commit

Permalink
pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
samitAtsyna committed Feb 26, 2024
1 parent 4407154 commit bdb9484
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pytest_rerunfailures.py
Original file line number Diff line number Diff line change
Expand Up @@ -534,15 +534,15 @@ def pytest_runtest_protocol(item, nextitem):
item.ihook.pytest_runtest_logstart(nodeid=item.nodeid, location=item.location)
reports = runtestprotocol(item, nextitem=nextitem, log=False)

# Check all reports to see if any rerun is needed (So teardown report is checked before processing call (test))
# Check all reports to see if any rerun is needed
# (So teardown report is checked before processing call (test))
should_rerun = False
for r in reports:
r.rerun = item.execution_count - 1
should_rerun = not _should_not_rerun(item, r, reruns)
if should_rerun:
break


for report in reports: # 3 reports: setup, call, teardown
if not should_rerun:
# last run or no failure detected, log normally
Expand Down

0 comments on commit bdb9484

Please sign in to comment.