matplotlib / matplotlib/pytest-mpl
default savefig format
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 272
- Fork
- 53
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
In the process of penning #150, I noticed that when capturing the test image to an io.Bytes in-memory buffer:
That the format kwarg to savefig isn't used.
Would you be adverse to defaulting to format='png', particularly when writing to a buffer, as (from what I understand) matplotlib will default to the rcParams to select the file-format to save to the buffer for the image, and this could be a source confusion/issues for hashing repeatability for developers when testing.
i.e., what I'm proposing is that a format='png' is injected into the savefig_kwargs, iff not specified by the caller as a kwarg option in the marker decorator.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
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.
Direzione di ricerca
Inizia in pytest_mpl/plugin.py, nella chiamata a savefig indicata intorno alle righe 419–421, poi segui come savefig_kwargs proviene dal decoratore del marker. Controlla come viene gestito il buffer in memoria e verifica che il formato predefinito sia PNG, mentre un formato fornito dal chiamante rimanga invariato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- matplotlib, python
- Ambito
- testing-qa
- Tipo di issue
- Funzionalità
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Specificata chiaramente
- Idoneità per principianti
- 48/100