From c8135443e45880b5dbf6b3c8f7c0f5c007c4bd35 Mon Sep 17 00:00:00 2001 From: Ryan May Date: Tue, 28 Jul 2020 20:06:47 -0600 Subject: [PATCH] MNT: Update test image thresholds for Matplotlib 3.3 Slight change to rotation calculation results in subtle pixel-level changes, so update the tolerances--the changes aren't big enough to warrant new images. --- tests/plots/test_declarative.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/plots/test_declarative.py b/tests/plots/test_declarative.py index 32c68923980..c1eba69735f 100644 --- a/tests/plots/test_declarative.py +++ b/tests/plots/test_declarative.py @@ -408,7 +408,7 @@ def test_declarative_barb_earth_relative(): return pc.figure -@pytest.mark.mpl_image_compare(remove_text=True, tolerance=0.347) +@pytest.mark.mpl_image_compare(remove_text=True, tolerance=0.607) def test_declarative_barb_gfs(): """Test making a contour plot.""" data = xr.open_dataset(get_test_data('GFS_test.nc', as_file_obj=False)) @@ -436,7 +436,8 @@ def test_declarative_barb_gfs(): return pc.figure -@pytest.mark.mpl_image_compare(remove_text=True, tolerance=0.022) +@pytest.mark.mpl_image_compare(remove_text=True, + tolerance={'2.1': 0.407}.get(MPL_VERSION, 0.022)) def test_declarative_sfc_obs(): """Test making a surface observation plot.""" data = pd.read_csv(get_test_data('SFC_obs.csv', as_file_obj=False),