diff --git a/tests/plots/test_declarative.py b/tests/plots/test_declarative.py index b20fbea1d4f..1c369770af0 100644 --- a/tests/plots/test_declarative.py +++ b/tests/plots/test_declarative.py @@ -1180,7 +1180,9 @@ def test_declarative_title_fontsize(): return pc.figure -@pytest.mark.mpl_image_compare(remove_text=False, tolerance=0.607) +@pytest.mark.mpl_image_compare(remove_text=False, + tolerance={'3.1': 11.49, + '3.0': 11.49}.get(MPL_VERSION, 0.607)) @needs_cartopy def test_declarative_colorbar_fontsize(): """Test adjusting the font size of a colorbar.""" @@ -1210,8 +1212,9 @@ def test_declarative_colorbar_fontsize(): return pc.figure -@pytest.mark.mpl_image_compare(remove_text=True, tolerance=0.607) -@needs_cartopy +@pytest.mark.mpl_image_compare(remove_text=True, + tolerance={'3.1': 2.12, + '3.0': 2.12}.get(MPL_VERSION, 0.607)) def test_declarative_station_plot_fontsize(): """Test adjusting the font size for station plots in PlotObs.""" data = parse_metar_file(get_test_data('metar_20190701_1200.txt', @@ -1245,7 +1248,9 @@ def test_declarative_station_plot_fontsize(): return pc.figure -@pytest.mark.mpl_image_compare(remove_text=True, tolerance=0.607) +@pytest.mark.mpl_image_compare(remove_text=True, + tolerance={'3.1': 20.3, + '3.0': 20.3}.get(MPL_VERSION, 0.607)) @needs_cartopy def test_declarative_contour_label_fontsize(): """Test adjusting the font size of contour labels."""