Incompatibility with pytest-forked
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Activo
- Stack tecnológico
- python
- Área
- testing-qa
Línea de trabajo
Comienza con el reproductor test_tmp.py proporcionado y ejecuta el comando de pytest mostrado con las opciones pytest-forked y rerunfailures. Rastrea cómo se gestiona la invocación combinada de --forked, --reruns y --only-rerun; después, añade una prueba de regresión y confirma que el comportamiento de reejecución previsto funciona de forma coherente.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
import time
import json
import pytest
import numpy as np
def test_TMP():
np.random.seed(int(time.time()))
if np.random.rand() > 0.2:
qByUser = "1e"
json.loads(qByUser).decode("utf-8")
pytest --reruns=10 --reruns-delay=1 --only-rerun=JSONDecodeError --forked test_tmp.py
============================================================================================================================= test session starts ==============================================================================================================================
platform linux -- Python 3.10.12, pytest-8.4.2, pluggy-1.6.0
Test order randomisation NOT enabled. Enable with --random-order or --random-order-bucket=<bucket_type>
rootdir: /mnt/home/duburcqa/workspace/src
plugins: dash-3.2.0, forked-1.6.0, print-1.2.0, random-order-1.2.0, rerunfailures-15.1, xdist-3.8.0, syrupy-5.0.0
collected 1 item
test_tmp.py F [100%]
=================================================================================================================================== FAILURES ===================================================================================================================================
___________________________________________________________________________________________________________________________________ test_TMP ___________________________________________________________________________________________________________________________________
def test_TMP():
np.random.seed(int(time.time()))
if np.random.rand() > 0.2:
qByUser = "1e"
> qUserData = json.loads(qByUser).decode("utf-8")
test_tmp.py:12:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.10/json/__init__.py:346: in loads
return _default_decoder.decode(s)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <json.decoder.JSONDecoder object at 0x7313fb84efe0>, s = '1e', _w = <built-in method match of re.Pattern object at 0x7313fb9075e0>
def decode(self, s, _w=WHITESPACE.match):
"""Return the Python representation of ``s`` (a ``str`` instance
containing a JSON document).
"""
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
end = _w(s, end).end()
if end != len(s):
> raise JSONDecodeError("Extra data", s, end)
E json.decoder.JSONDecodeError: Extra data: line 1 column 2 (char 1)
/usr/lib/python3.10/json/decoder.py:340: JSONDecodeError
=========================================================================================================================== short test summary info ============================================================================================================================
FAILED test_tmp.py::test_TMP
============================================================================================================================== 1 failed in 0.13s ===============================================================================================================================
- Lenguaje dominante
- Python
- Estrellas
- 480
- Forks
- 110
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de pytest-dev/pytest-rerunfailures
-
Zero rerun delay can abort with OverflowError for a large finite backoff factorPosiblemente ocupada @AryanRG la tomó hace 9 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Non-finite rerun delay settings abort pytest with INTERNALERRORPosiblemente ocupada @Arham-Begani la tomó hace 8 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
-
fail-on-flaky returns success after a rerun with xdistPosiblemente ocupada @harbinresearcher la tomó hace 10 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 15/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
pytest-dev/pytest-rerunfailures#326 · 7 comentarios ·
-
Add ability to raise runtime warnings on rerunsPosiblemente ocupada @LouisDeconinck la tomó hace 39 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
pytest-dev/pytest-rerunfailures#318 · 2 comentarios ·
Todos los issues de pytest-dev/pytest-rerunfailures
Issues similares
-
tests/strategies_test.py:174 goes uncovered on about 1 run in 100, failing the coverage ratchetAbiertoflaky-watch
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
btclib-org/btclib#2839 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
nion-software/nionswift#2018 ·
Los mantenedores suelen responder en 1 día
-
Deleting a member fails when another member's share transfer points to themPosiblemente ocupada @Beerlesklopfer la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
FoodCoopX/wirgarten-tapir#1336 ·
Los mantenedores suelen responder en 3 días
-
pydanty:is-working
Dificultad 2/5 1-3 horas Aptitud para principiantes 71/100
pydantic/pydantic-ai#11467 ·
Los mantenedores suelen responder en 1 día
-
Link Checker ReportAbiertoautomated issue linkchecker report
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
QuantEcon/lecture-python.myst#1098 ·
Los mantenedores suelen responder en 1 día