Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Non-finite rerun delay settings abort pytest with INTERNALERROR

Aperta
#390 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

@Arham-Begani ci sta già lavorando.

Dal 18/10/2026.

  • #391 di @Arham-Begani — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Ferma
Stack tecnologico
python
Ambito
testing

Direzione di ricerca

Start at the rerun delay and backoff settings used by the CLI, ini configuration, and flaky markers; the report provides reproductions for each input path. Run the four commands in the issue to observe the INTERNALERROR, then add regression coverage for non-finite values and verify they warn and fall back to 0 / 1.0 while finite values retain their behavior. A linked pull request is already open.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Reproduction

On master 01fd226bd533ecd7f6aabe7c155c4ca7bcd8598c, Windows / CPython 3.13.15 / pytest 9.1.1:

# test_recovery.py
def test_recovery(request):
    assert request.node.execution_count == 3
python -m pytest -q --reruns 2 --reruns-delay=nan test_recovery.py
python -m pytest -q --reruns 2 --reruns-delay=inf test_recovery.py
python -m pytest -q --reruns 2 --reruns-delay-backoff-factor=nan test_recovery.py
python -m pytest -q --reruns 2 --reruns-delay-backoff-factor=inf test_recovery.py

All four commands exit with code 3 / INTERNALERROR in time.sleep. NaN produces ValueError; positive-infinite delay produces OverflowError; an infinite backoff factor with the default zero delay produces NaN on the second rerun. These runs use real sleep calls. The same non-finite values can also come from ini settings and flaky marker arguments.

Expected behavior / proposed fix

Validate that the configured delay and backoff factor are finite before using them, warn, and fall back to 0 / 1.0 respectively. This follows the existing handling of negative values. Negative values (including negative infinity) would keep their current warning and defaults. Valid finite settings would retain their current behavior.

I have a focused patch in progress with regression coverage for CLI, ini, keyword markers and positional markers.

This concerns explicit NaN/infinite configuration, which is separate from #388 / #389's overflow during exponentiation of a large finite factor. The proposed patch does not change the retry formula or duplicate that implementation.

AI assistance disclosure: an AI coding assistant performed this investigation and drafted this report with the account owner's authorization.

Lingua principale
Python
Stelle
480
Fork
110
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di pytest-dev/pytest-rerunfailures

Tutte le issue di pytest-dev/pytest-rerunfailures

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.