VS Code compatibility help
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- python, vscode
- Área
- developer-experience, testing
Línea de trabajo
Comienza revisando el comportamiento del hook pytest_exception_interact descrito en el issue, incluidos node.execution_count, marker kwargs y report._rerun. Compara esos valores con el flujo de los payloads de resultado y excepción de la extensión de VS Code; se considera completado cuando se haya determinado cómo distinguir los fallos de los reruns de los fallos finales y se haya documentado el cambio de compatibilidad adecuado.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Hi! I am the maintainer of testing in the Python extension for VS Code. I was doing a review of top pytest extensions to check their compatibility with the extension. I tried pytest-rerunfailures and found it didn't work correctly in the case that the test failed, then later passed. Instead of showing the test as passing, it only took the first failure and displayed that in the UI. I am looking for advice on how to make sure the plugin works correctly- below I explain a bit about how the extension works and hopefully that can give you enough context to provide some advice. Thanks!
Pytest in the Python extension works with a custom pytest plugin for VS Code. In this plugin it collects test results after each test runs and sends a payload back to the main extension host to display to the user (this allows for dynamic run, where the results come in as they finish instead of all at the end of the entire run). The extension also sends back payloads on exceptions, which includes the def pytest_exception_interact(node, call, report): hook from pytest.
What I am noticing as I am testing with the pytest-rerunfailures plugin is that a test which fails once, but still can rerun, calls the hook def pytest_exception_interact(node, call, report):. From my investigation it seems that the node.execution_count variable keeps track of how many times that test has run. Then if the rerun value is set via a pytest marker, the max attempts can be found in the marker kwargs or if the reruns are defined from the command line argument it is stored on the _rerun attribute on report.
The best solution I can determine right nwo is to not send the failure to the extension if the def pytest_exception_interact(node, call, report): is called when the node.execution_count < max_attempts, but the max attempts can be defined a few different ways. Is this the correct way to handle this situation and the best way to check to see if the given test has more reruns to execute?
Sorry for the long explanation and please let me know what other information I can provide for clarity. If you are not familiar, you can try testing in VS Code by clicking on the "beaker" icon in the sidebar of VS Code and from there you can setup testing with pytest. I appreciate your help as I try and get the best experience for this plugin in VS Code! Thanks
- Lenguaje dominante
- Python
- Estrellas
- 481
- 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 17 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 15 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 18 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 46 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
-
cost:cheap practicality:seen-in-the-wild severity:medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
fairagro/m4.2_advanced_middleware_api#620 ·
Los mantenedores suelen responder en 1 día
-
area:security effort:S priority:P2 provider:local-libvirt status:ready type:docs
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
randomparity/kdive#3495 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
microsoft/markitdown#2820 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días