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
Add tests for ImageGrid #23553
Add tests for ImageGrid #23553
Conversation
Oh, also, do you need text; can you set |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to connect the colorbars with the respective axes images, so that they are not empty. C.f. https://matplotlib.org/stable/gallery/axes_grid1/demo_axes_grid.html
Also, not sure if it’s worth it here, but I generally try to introduce asymmetry into tests, e.g. (2,3) instead of (2,2) so that the test gets sensitive to a mixup of rows/columns.
I also test |
Sure, I can modify the tests like that. |
0a16124
to
65411ae
Compare
65411ae
to
38a32f1
Compare
This is updated based on the comments, including expanding the test names to tell what is tested. It is maybe not a good idea to test two features, colorbar and |
As far as I understand,
|
I was a bit unclear. I was referring to combination of colorbar combinations ('each', 'single', 'edge') x ('left', 'right', 'top', 'bottom'). Not so clear why the colorbar content should be in the test (which is not at all related to ImageGrid as such), but the text should not (which allows visible inspection of what should happen). |
PR Summary
Add tests for ImageGrid.
Minor correction to docs and code as one can get the impression that a string can be passed as
rect
, but this will give an error later on.PR Checklist
Tests and Styling
pytest
passes).flake8-docstrings
and runflake8 --docstring-convention=all
).Documentation
doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).