facebookresearch / facebookresearch/ProgramBench

pytest-rerunfailures 16.6.1 duplicates JUnit records and inflates scores

Aperta
#64 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
924
Fork
67
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

### Problem

The evaluator installs `pytest-rerunfailures` without a version constraint. Version 16.6.1 changed its JUnit reporting behavior so that every rerun attempt produces a `` record.

For a test that still fails after two reruns, the XML contains two empty records followed by one failure record for the same `classname` and `name`:

```xml

AssertionError

```

`parse_test_results` currently processes each record independently and treats a record without a result child as passed. The single failing logical test is therefore scored as two passes and one failure, producing a score of 2/3 instead of 0/1.

### Reproduction

1. Install `pytest-rerunfailures==16.6.1`.
2. Run an always-failing test with `pytest --reruns=2 --junitxml=results.xml`.
3. Pass the resulting XML to `parse_test_results`.

With 16.6, the XML contains only the final failure record. With 16.6.1, it contains the three records shown above.

### Expected behavior

Each logical test should contribute exactly once to the score, using the final attempt's status. Retry-selection metrics should also count logical tests rather than raw JUnit records. The installed rerun plugin version should be reproducible.

A fix is available in #63.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Parti da parse_test_results e riproduci il problema con pytest-rerunfailures==16.6.1, --reruns=2 e il test che fallisce sempre descritto qui. Verifica che i record JUnit duplicati siano raggruppati per test logico e valutati usando il tentativo finale, che le metriche di selezione dei tentativi ripetuti contino i test logici e che la versione installata del plugin di riesecuzione sia riproducibile.

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

Valutazione

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

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.