Skip to content
6 changes: 6 additions & 0 deletions test_pytest_rerunfailures.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,9 @@ def test_fail():
'--reruns-delay', str(delay_time))

if delay_time < 0:
result.stdout.fnmatch_lines(
'*UserWarning: Delay time between re-runs cannot be < 0. '
'Using default value: 0')
delay_time = 0

time.sleep.assert_called_with(delay_time)
Expand All @@ -266,6 +269,9 @@ def test_fail_two():
result = testdir.runpytest()

if delay_time < 0:
result.stdout.fnmatch_lines(
'*UserWarning: Delay time between re-runs cannot be < 0. '
'Using default value: 0')
delay_time = 0

time.sleep.assert_called_with(delay_time)
Expand Down