Skip to content

Commit f95a0b9

Browse files
committed
rename should_fail_on_error to better indicate this is a hard failure
1 parent ce32f65 commit f95a0b9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pytest_rerunfailures.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def _remove_failed_setup_state_from_session(item):
182182
setup_state.stack = list()
183183

184184

185-
def _should_fail_on_error(session_config, report):
185+
def _should_hard_fail_on_error(session_config, report):
186186
if report.outcome != 'failed':
187187
return False
188188

@@ -224,7 +224,7 @@ def pytest_runtest_protocol(item, nextitem):
224224
reports = runtestprotocol(item, nextitem=nextitem, log=False)
225225

226226
for report in reports: # 3 reports: setup, call, teardown
227-
is_terminal_error = _should_fail_on_error(item.session.config, report)
227+
is_terminal_error = _should_hard_fail_on_error(item.session.config, report)
228228
report.rerun = item.execution_count - 1
229229
xfail = hasattr(report, 'wasxfail')
230230
if item.execution_count > reruns or not report.failed or xfail or is_terminal_error:

0 commit comments

Comments
 (0)