pytest-html version 3.1.1 bug- Internal error in pytest_runtest_makereport causes test to show as Passed in HTML report
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- html, python
- Área
- testing-qa
Línea de trabajo
Empieza reproduciendo el problema con pytest-html 3.1.1, pytest, --html=report.html y una excepción o una interrupción de teclado en el hook pytest_runtest_makereport. Sigue cómo llega el resultado del hook al informe HTML y asegúrate de que la prueba afectada no se muestre como Passed; aún hay que resolver si el resultado previsto debe ser ERROR o FAILED.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
When an internal error occurs inside the pytest_runtest_makereport hook,
pytest-html 3.1.1 does not receive a valid report outcome and silently
defaults to displaying the test as Passed in the HTML report.
Environment
- pytest-html: 3.1.1
- pytest: 7.1.2 or 9.0.3
- Python: 3.13.7
- OS: Windows
Expected Behavior
Test should be marked as ERROR in the HTML report.
Actual Behavior
Test is marked as Passed in the HTML report, giving a false green result.
Steps to Reproduce
- Trigger an exception inside
pytest_runtest_makereporthook for eg raise RuntimeError("BOOM") - Run pytest with
--html=report.html - Open the HTML report
- Observe the affected test shows as Passed
Additional Notes
pytest-html 4.2.0 handles this differently — the report is empty instead
of showing a false Passed — but neither behavior is correct.
the correct expected outcome is debatable:
ERROR — represents a framework/fixture level problem, not a test assertion failure. This is probably the most accurate.
FAILED — could argue this since something clearly went wrong.
At minimum — not Passed, since that's factually wrong.
-In case of keyboard interrupt too same issue
- Lenguaje dominante
- Python
- Estrellas
- 779
- Forks
- 259
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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-html
-
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
pytest-dev/pytest-html#1077 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
pytest-dev/pytest-html#1039 ·
-
Feature: pluggable HTML themes via Jinja2 template inheritancePosiblemente ocupada @RonnyPfannschmidt la tomó hace 141 días. Abierto
pytest-dev/pytest-html#1029 · 1 reacción · 1 asignado ·
-
pytest-html does not escape HTML in testId (v4.2.0)Posiblemente ocupada @golikovichev la tomó hace 125 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
pytest-dev/pytest-html#1024 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 48/100
pytest-dev/pytest-html#1010 ·
Todos los issues de pytest-dev/pytest-html
Issues similares
-
effort: low prio: low ready
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
digitalfabrik/integreat-cms#4616 ·
Los mantenedores suelen responder en 5 días
-
bug difficulty:2 good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
MakazhanAlpamys/Soup#1865 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
FinanceFlash/unvibecode#233 ·
Los mantenedores suelen responder en 1 día
-
area: agents area: docs good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
openapi/gknowledge#23 ·
-
useless-suppression reported for deprecated-* messages that should be exemptPosiblemente ocupada @adityasinha-ghub la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
pylint-dev/pylint#11656 ·
Los mantenedores suelen responder en 1 día