Skip to content

Commit

Permalink
MNT: Update test image thresholds for Matplotlib 3.3
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dopplershift committed Aug 5, 2020
1 parent 87c0700 commit c813544
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/plots/test_declarative.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit c813544

Please sign in to comment.