matplotlib / matplotlib/pytest-mpl

Saving multiple figures in one test

Open
#133 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
272
Forks
53
PR merge metrics
No merged PRs in 30d

Description

I need to test multiple figures that are generated by a method for correctness. Using @pytest.mark.mpl_image_compare does not enable me to do that as it does not save multiple figures. Any way to do that?

Right now my thought is having dummy tests that return these figures individually from a shared variable and validate it one by one in different tests

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing the pytest.mark.mpl_image_compare entry point and how it currently handles figures. Define and test a way for one test to generate and compare multiple figures, replacing the proposed shared-variable dummy tests while preserving image validation for each figure.

Written by the indexing model from the issue text.

Assessment

Tech stack
matplotlib, python
Domain
testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.