Non-finite rerun delay settings abort pytest with INTERNALERROR
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 35/100
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
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di pytest-dev/pytest-rerunfailures
-
Zero rerun delay can abort with OverflowError for a large finite backoff factorForse già presa @AryanRG l’ha presa 11 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
fail-on-flaky returns success after a rerun with xdistForse già presa @harbinresearcher l’ha presa 12 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 15/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
pytest-dev/pytest-rerunfailures#326 · 7 commenti ·
-
Add ability to raise runtime warnings on rerunsForse già presa @LouisDeconinck l’ha presa 41 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
pytest-dev/pytest-rerunfailures#318 · 2 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
pytest-dev/pytest-rerunfailures#313 · 5 commenti ·
Tutte le issue di pytest-dev/pytest-rerunfailures
Issue simili
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
glossyio/traffic-monitor#264 ·
I maintainer di solito rispondono entro 1 giorno
-
Add self-hostAperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
Atarity/deploy-your-own-saas#102 ·
-
[Bug]: RDFlex silently drops the covariate adjustment when the outcome or treatment column is integer-typedForse già presa @vrjdev l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
DoubleML/doubleml-for-py#424 ·
I maintainer di solito rispondono entro 1 giorno
-
agentic-dmx docs enhancement
Difficoltà 1/5 1-3 ore Idoneità per principianti 86/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
521xueweihan/HelloGitHub#4150 ·