Skip to content

Commit ab39616

Browse files
authored
Figure.psconvert: Ignore the unrecognized 'metadata' parameter added by pytest-mpl v0.17.0 (#3054)
1 parent 2d78563 commit ab39616

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pygmt/figure.py

+3
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,9 @@ def psconvert(self, **kwargs):
228228
{verbose}
229229
"""
230230
kwargs = self._preprocess(**kwargs)
231+
# pytest-mpl v0.17.0 added the "metadata" parameter to `Figure.savefig`, which
232+
# is not recognized. So remove it before calling `Figure.psconvert`.
233+
kwargs.pop("metadata", None)
231234
# Default cropping the figure to True
232235
if kwargs.get("A") is None:
233236
kwargs["A"] = ""

0 commit comments

Comments
 (0)