Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mock plt.subplots which has multiple outputs #29

Merged
merged 1 commit into from
Jan 15, 2024
Merged

Conversation

hunse
Copy link
Collaborator

@hunse hunse commented Dec 7, 2023

plt.subplots could not be mocked out when used in the common form fig, axes = plt.subplots(...), since our mock objects just return one Mock output which could not be split. I've started a registry of functions that return multiple outputs (with plt.subplots currently being the only one), so that we can return the proper number of mock objects.

Copy link

github-actions bot commented Dec 7, 2023

Coverage report

The coverage rate went from 100% to 100% ➡️

100% of new lines are covered.

Diff Coverage details (click to unfold)

pytest_plt/version.py

100% of new lines are covered (100% of the complete file).

pytest_plt/plugin.py

100% of new lines are covered (100% of the complete file).

@tbekolay tbekolay merged commit 9901396 into main Jan 15, 2024
7 checks passed
@tbekolay tbekolay deleted the multi-functions branch January 15, 2024 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants