Skip to content

[MAINT] change tests to figure testing #145

@slumnitz

Description

@slumnitz

Most of splot's tests are based on testing whether or not a figure is generated.
This should slowly transition to testing the content of the figure itself as suggested by @martinfleis in #140

One option is to get the attributes from the plotted collection as we do in geopandas https://github.com/geopandas/geopandas/blob/64598b6f0d872baf09657c27a9aa4c87d86d9131/geopandas/tests/test_plotting.py#L169

The other is to keep a reference image in tests and check against that as matplotlib does in some cases https://github.com/matplotlib/matplotlib/blob/ec126b0175c657f0adb5ca635eeabad7c142bb0b/lib/matplotlib/tests/test_colorbar.py#L188-L190

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions