Extras added after test execution in fixture are ignored
Nessuno ha ancora preso questa issue.
- #1073 di @afonsojanu — chiusa senza merge
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia riproducendo l’esempio documentato della fixture degli extras e traccia il modo in cui gli extras vengono raccolti nel report HTML prima e dopo l’esecuzione dei test. Verifica se è possibile includere gli extras successivi a yield; il lavoro è completato quando questi link compaiono nel report oppure la limitazione è documentata chiaramente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
The docs explain that one can use the extras fixture to add content to the html report, however only some of the extras are added. In the following code:
import pytest_html
def test_extra(extras):
extras.append(pytest_html.extras.text("before test!"))
yield # run test
extras.append(pytest_html.extras.text("after test!"))
only the before test part is actually added to the report. The docs don't mention anything about this behavior, so hard to tell if its a bug or not.
If this is a limitation of the framework, it would be really helpful to document it. If not, it would be really handy to fix it.
In my use case, I have a test which generates some files which I'd like to link to from the report. That has to be done after the test completes, but my links never show up in the report.
Thanks!
- Lingua principale
- Python
- Stelle
- 779
- Fork
- 259
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
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-html
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 68/100
pytest-dev/pytest-html#1077 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
pytest-dev/pytest-html#1039 ·
-
Feature: pluggable HTML themes via Jinja2 template inheritanceForse già presa @RonnyPfannschmidt l’ha presa 141 giorni fa. Aperta
pytest-dev/pytest-html#1029 · 1 reazione · 1 assegnatario ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
pytest-dev/pytest-html#1027 ·
-
pytest-html does not escape HTML in testId (v4.2.0)Forse già presa @golikovichev l’ha presa 124 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
pytest-dev/pytest-html#1024 ·
Tutte le issue di pytest-dev/pytest-html
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
huggingface/smolagents#2976 ·
I maintainer di solito rispondono entro 1 giorno
-
bug Triage-Needed
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
FuRongJun-1999/dsh-memory#170 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
pgvector/pgvector-python#163 ·
-
[开源推荐] 打拼音就出篆书的输入法,附古文字创作小工具Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
521xueweihan/HelloGitHub#3940 ·