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

test_rerun integration tests fail with pytest-rerunfailures 16.7

Aperta Adatta ai principianti
#1,085 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

Inizia in basereport.py a pytest_runtest_logreport e segui come vengono accumulati i report memorizzati e quando il report viene considerato concluso; l'issue dice che questi vengono elaborati senza essere cancellati al primo teardown non-rerun. Riproduci con testing/test_integration.py::TestHTML::test_rerun e TestLogCapturing::test_rerun con pytest-rerunfailures 16.7, poi conferma che il conteggio dei rerun risulta 2 anziché 5 dopo la sequenza di teardown per tentativo.

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

Descrizione

With pytest-rerunfailures 16.7, both rerun integration tests fail:

FAILED testing/test_integration.py::TestHTML::test_rerun - AssertionError: Expected <5 Reruns> to match pattern <2 Reruns>, but did not.
FAILED testing/test_integration.py::TestLogCapturing::test_rerun - AssertionError: Expected <5 Reruns> to match pattern <2 Reruns>, but did not.

The test uses @pytest.mark.flaky(reruns=2) but the report shows 5 reruns.
Same result with the app.js/style.css shipped in the 4.2.0 sdist, so it
is not related to the frontend build.

Bisected: it starts with pytest-rerunfailures 16.7, which now runs and
reports teardown after each failed attempt
(setup, call:rerun, teardown, setup, call:rerun, teardown, ...).

pytest_runtest_logreport in basereport.py treats the first non-rerun
teardown as "finished" and processes all stored reports without
clearing them, so reruns are processed again at each teardown:
1 + 2 + 2 = 5 "Rerun" rows (3 of them with 0 ms duration).

Environment: pytest-html 4.2.0, pytest 9.1.1, pytest-rerunfailures 16.7,
Python 3.14, Debian unstable, chromium + chromedriver.

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

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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-html

Tutte le issue di pytest-dev/pytest-html

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.