-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Make more of testing/ pytest-independent. #14562
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
Conversation
97fea4b
to
8faa951
Compare
Can you please clarify what this achieves or is aspiring? Matplotlib's own tests will depend on |
Sorry for the lack of clarity. |
f28bc2d
to
b0d5f41
Compare
ae97b3e
to
ed4eaf1
Compare
ed4eaf1
to
7ff4d34
Compare
This makes it actually possible to write tests independently of pytest (the API is still private, but could be made public): ``` import unittest from matplotlib import pyplot as plt from matplotlib.testing.decorators import _make_image_comparator class TestFoo(unittest.TestCase): @_make_image_comparator(baseline_images=["foo"], extension="png") def test_bar(self): fig, ax = plt.subplots() ``` works as expected.
7ff4d34
to
4b55644
Compare
is this really something you want to pursue? I'm not following what its for either... |
I'll try to break this down into smaller parts. |
PR Summary
This makes it actually possible to write tests independently of pytest
(the API is still private, but could be made public):
works as expected.
See also discussion starting at https://gitter.im/matplotlib/matplotlib?at=5d064454a8d9871b3299790a.
Depends on #14338.PR Checklist