In the process of penning #150, I noticed that when capturing the test image to an io.Bytes in-memory buffer:
|
imgdata = io.BytesIO() |
|
|
|
fig.savefig(imgdata, **savefig_kwargs) |
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.
In the process of penning #150, I noticed that when capturing the test image to an
io.Bytesin-memory buffer:pytest-mpl/pytest_mpl/plugin.py
Lines 419 to 421 in e387618
That the
formatkwarg tosavefigisn't used.Would you be adverse to defaulting to
format='png', particularly when writing to a buffer, as (from what I understand)matplotlibwill default to thercParamsto 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 thesavefig_kwargs, iff not specified by the caller as a kwarg option in the marker decorator.