--cov as final element in addopts creates confusing behaviour
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- python
- Área
- testing-qa
Línea de trabajo
Start by reproducing the behavior with the shown pyproject.toml configuration and the commands pytest specific/file.py and pytest -s specific/file.py. Trace how the final --cov entry is combined with the selected test path; done means pytest specific/file.py runs only that file while coverage remains enabled.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Hi there,
I'm not sure this is a pytest bug but here it goes.
I have the following pyproject.toml configuration
[tool.pytest.ini_options]
testpaths = "test"
addopts = [
"--import-mode=importlib", # Recommended by pytest
"--cov",
]
so I can easily use
pytest
to start my tests.
Now when I want to test only a specific file, doing
pytest specific/file.py
ignores the argument, while in the mean time, passing another optional argument such as the following
pytest -s specific/file.py
works perfectly as intended.
Am I missing a piece or is this a pytest-side problem?
Thanks in advance!
All the best.
Élie
- Lenguaje dominante
- Python
- Estrellas
- 2.1k
- Forks
- 256
- Merge medio
- 6 d 10 min
- PR fusionados (30 d)
- 2
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-cov
-
Celery tests require package; test blows up if Celery not installed instead of skipping the tests gracefullyPosiblemente ocupada @dchaudhari7177 la tomó hace 104 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
pytest-dev/pytest-cov#750 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
pytest-dev/pytest-cov#617 · 1 comentario ·
-
Only set dynamic context on coveragepy cores supporting it, perhaps?Posiblemente ocupada @terminalchai la tomó hace 19 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
pytest-dev/pytest-cov#755 · 3 comentarios ·
-
INTERNALERROR when generating html report using pytest-cov 7.1.0 with jinjaPosiblemente ocupada @daleselaji-dev la tomó hace 90 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
pytest-dev/pytest-cov#748 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 28/100
pytest-dev/pytest-cov#747 · 1 reacción ·
Todos los issues de pytest-dev/pytest-cov
Issues similares
-
[yugabyted] xcluster set_up and add_to_replication fail for database names containing - . or (Abiertokind/bug priority/medium qa_automation
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
yugabyte/yugabyte-db#37324 ·
Los mantenedores suelen responder en 1 día
-
good first issue
Dificultad 1/5 Menos de una hora Aptitud para principiantes 87/100
btclib-org/btclib-node#2260 ·
Los mantenedores suelen responder en 1 día
-
ChatBedrockConverse changes the keys of JSON tool results to camelCase (`order_id` becomes `orderId`)Posiblemente ocupada @geyazheng la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
langchain-ai/langchain-aws#1469 ·
Los mantenedores suelen responder en 1 día
-
GCToggler leaves collection enabled if the body re-enables itPosiblemente ocupada @Gambit-Checkmate la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
Los mantenedores suelen responder en 7 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
EESSI/docs#949 · 1 comentario ·
Los mantenedores suelen responder en 1 día