FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Backport PR #16656 on branch v3.2.x (Make test_imagegrid_cbar_mode_edge less flaky.) by meeseeksmachine · Pull Request #16705 · matplotlib/matplotlib · GitHub

Repository navigation

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
12 changes: 9 additions & 3 deletions lib/mpl_toolkits/tests/test_axes_grid.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,16 @@
# The original version of this test relied on mpl_toolkits's slightly different
# colorbar implementation; moving to matplotlib's own colorbar implementation
# caused the small image comparison error.
@pytest.mark.parametrize("legacy_colorbar", [False, True])
@image_comparison(['imagegrid_cbar_mode.png'],
@image_comparison(['imagegrid_cbar_mode.png', 'imagegrid_cbar_mode.png'],
remove_text=True, style='mpl20', tol=0.3)
def test_imagegrid_cbar_mode_edge(legacy_colorbar):
def test_imagegrid_cbar_mode_edge():
# Note, we don't use @pytest.mark.parametrize, because in parallel this
# might cause one process result to overwrite another's.
for legacy_colorbar in [False, True]:
_test_imagegrid_cbar_mode_edge(legacy_colorbar)


def _test_imagegrid_cbar_mode_edge(legacy_colorbar):
mpl.rcParams["mpl_toolkits.legacy_colorbar"] = legacy_colorbar

X, Y = np.meshgrid(np.linspace(0, 6, 30), np.linspace(0, 6, 30))
Expand Down

Back | FazBrowse Home | New Git URL