--cov as final element in addopts creates confusing behaviour
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- python
- Ambito
- testing-qa
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Python
- Stelle
- 2.1k
- Fork
- 256
- Merge medio
- 6g 10m
- PR unite (30g)
- 2
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di pytest-dev/pytest-cov
-
Celery tests require package; test blows up if Celery not installed instead of skipping the tests gracefullyForse già presa @dchaudhari7177 l’ha presa 104 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
pytest-dev/pytest-cov#750 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
pytest-dev/pytest-cov#617 · 1 commento ·
-
Only set dynamic context on coveragepy cores supporting it, perhaps?Forse già presa @terminalchai l’ha presa 19 giorni fa. Aperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
pytest-dev/pytest-cov#755 · 3 commenti ·
-
INTERNALERROR when generating html report using pytest-cov 7.1.0 with jinjaForse già presa @daleselaji-dev l’ha presa 90 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 58/100
pytest-dev/pytest-cov#748 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 28/100
pytest-dev/pytest-cov#747 · 1 reazione ·
Tutte le issue di pytest-dev/pytest-cov
Issue simili
-
[yugabyted] xcluster set_up and add_to_replication fail for database names containing - . or (Apertakind/bug priority/medium qa_automation
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
yugabyte/yugabyte-db#37324 ·
I maintainer di solito rispondono entro 1 giorno
-
good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 87/100
btclib-org/btclib-node#2260 ·
I maintainer di solito rispondono entro 1 giorno
-
ChatBedrockConverse changes the keys of JSON tool results to camelCase (`order_id` becomes `orderId`)Forse già presa @geyazheng l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
langchain-ai/langchain-aws#1469 ·
I maintainer di solito rispondono entro 1 giorno
-
GCToggler leaves collection enabled if the body re-enables itForse già presa @Gambit-Checkmate l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 7 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno