Incompatible with pytest-timeout plugin
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- python
- Ambito
- testing-qa
Direzione di ricerca
Inizia eseguendo la riproduzione fornita di pytester con pytest-rerunfailures e pytest-timeout, quindi esamina la gestione degli hook di pytest del plugin coinvolti nelle riesecuzioni. Il lavoro è completato quando il timeout viene applicato nuovamente durante la riesecuzione e la riproduzione segnala una riesecuzione e un test fallito.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
pytest-rerunfailures is not compatible with the pytest-timeout plugin.
Probably b/c the same pytest hooks are used. The first time, the timeout is observed, but when the test case re-runs, there's no timeout.
pytest-timeoutis more widely used and likely would be easier for the fix to be in this plugin if possible..
Here's a test that fails:
import pytest
pytest_plugins = 'pytester'
def test_pytest_timeout_compatibility_fails(testdir):
"""
Verifies the `pytest-rerunfailures` plugin is compatible with `pytest-timeout`
plugin when the test case is not done in the allotted time.
"""
testdir.makepyfile(
"""
import time
import pytest
@pytest.mark.flaky
@pytest.mark.timeout(timeout=1)
def test_times_out():
time.sleep(2)
assert True
"""
)
result = testdir.runpytest()
outcome = result.parseoutcomes()
assert outcome.get('rerun') == 1
assert outcome.get('failed') == 1
When the test case re-runs, it ignores the timeout and passes.
Note: doesn't matter which decorator comes first (flaky or timeout), the behavior is the same.
- Lingua principale
- Python
- Stelle
- 481
- 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 16 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Non-finite rerun delay settings abort pytest with INTERNALERRORForse già presa @Arham-Begani l’ha presa 14 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
-
fail-on-flaky returns success after a rerun with xdistForse già presa @harbinresearcher l’ha presa 17 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 45 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
pytest-dev/pytest-rerunfailures#318 · 2 commenti ·
Tutte le issue di pytest-dev/pytest-rerunfailures
Issue simili
-
area:scripts area:tests bug priority:later
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Ikalus1988/MisakaNet#4358 ·
I maintainer di solito rispondono entro 1 giorno
-
Discovered ports from service discovery are never propagated to modules in Module.load()Forse già presa @vishalmore90 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
OWASP/Nettacker#1828 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
aws-samples/sample-per-model-bedrock#708 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
[Performance] Bound resolve_api_hashes raw fallback reads to the 1 MiB region actually scannedAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
sjkim1127/Reversecore_MCP#365 ·
I maintainer di solito rispondono entro 1 giorno