exercism / exercism/python

[Pytest Tooling] Eliminate spurious Pytest warnings about unregistered marks

Abierto
#2,745 10 comentarios 0 reacciones 0 asignados Ver en GitHub
bug 🐛 on hold ✋🏽 smolder🍲
Lenguaje dominante
Python
Estrellas
2.5k
Forks
1.5k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

When running the test suites for a Python exercise in a local environment, Pytest generates a set of warnings because each of the tests is annotated (decorated) with `@pytest.mark.task`. Because `task` isn't [registered](https://docs.pytest.org/en/latest/how-to/mark.html#registering-marks), the Pytest output includes lines such as
```
dicts_test.py:50
/Users/xyz/Exercism/python/inventory-management/dicts_test.py:50: PytestUnknownMarkWarning: Unknown pytest.mark.task - is this a typo? You can register custom marks to avoid this warning - for details, see https://docs.pytest.org/en/stable/mark.html
@pytest.mark.task(taskno=4)
```
This output is noisy and of little value to the developer.

Would it be reasonable to add a `pytest.ini` or `pyproject.toml` file as described in the link above to each of the exercises?

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.