From b4cc76966207d2f8b2fab6afd67eedcf6b4a47f0 Mon Sep 17 00:00:00 2001 From: Kyle Sunden Date: Wed, 8 May 2024 15:50:09 -0500 Subject: [PATCH] Bump some tolerances for Macos ARM --- lib/matplotlib/tests/test_axes.py | 2 +- lib/matplotlib/tests/test_lines.py | 2 +- lib/matplotlib/tests/test_patheffects.py | 2 +- lib/mpl_toolkits/mplot3d/tests/test_axes3d.py | 5 +++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py index 3a38abc1eebf..ee99054fe284 100644 --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py @@ -5872,7 +5872,7 @@ def test_pie_linewidth_0(): plt.axis('equal') -@image_comparison(['pie_center_radius.png'], style='mpl20', tol=0.007) +@image_comparison(['pie_center_radius.png'], style='mpl20', tol=0.01) def test_pie_center_radius(): # The slices will be ordered and plotted counter-clockwise. labels = 'Frogs', 'Hogs', 'Dogs', 'Logs' diff --git a/lib/matplotlib/tests/test_lines.py b/lib/matplotlib/tests/test_lines.py index c7b7353fa0db..531237b2ba28 100644 --- a/lib/matplotlib/tests/test_lines.py +++ b/lib/matplotlib/tests/test_lines.py @@ -185,7 +185,7 @@ def test_set_drawstyle(): @image_comparison( ['line_collection_dashes'], remove_text=True, style='mpl20', - tol=0.65 if platform.machine() in ('aarch64', 'ppc64le', 's390x') else 0) + tol=0 if platform.machine() == 'x86_64' else 0.65) def test_set_line_coll_dash_image(): fig, ax = plt.subplots() np.random.seed(0) diff --git a/lib/matplotlib/tests/test_patheffects.py b/lib/matplotlib/tests/test_patheffects.py index 7c4c82751240..bf067b2abbfd 100644 --- a/lib/matplotlib/tests/test_patheffects.py +++ b/lib/matplotlib/tests/test_patheffects.py @@ -30,7 +30,7 @@ def test_patheffect1(): @image_comparison(['patheffect2'], remove_text=True, style='mpl20', - tol=0.052 if platform.machine() == 'arm64' else 0) + tol=0.06 if platform.machine() == 'arm64' else 0) def test_patheffect2(): ax2 = plt.subplot() diff --git a/lib/mpl_toolkits/mplot3d/tests/test_axes3d.py b/lib/mpl_toolkits/mplot3d/tests/test_axes3d.py index 731b0413bf65..ed56e5505d8e 100644 --- a/lib/mpl_toolkits/mplot3d/tests/test_axes3d.py +++ b/lib/mpl_toolkits/mplot3d/tests/test_axes3d.py @@ -113,7 +113,8 @@ def test_axes3d_repr(): "title={'center': 'title'}, xlabel='x', ylabel='y', zlabel='z'>") -@mpl3d_image_comparison(['axes3d_primary_views.png'], style='mpl20') +@mpl3d_image_comparison(['axes3d_primary_views.png'], style='mpl20', + tol=0.05 if platform.machine() == "arm64" else 0) def test_axes3d_primary_views(): # (elev, azim, roll) views = [(90, -90, 0), # XY @@ -1589,7 +1590,7 @@ def test_errorbar3d_errorevery(): @mpl3d_image_comparison(['errorbar3d.png'], style='mpl20', - tol=0.014 if platform.machine() == 'arm64' else 0) + tol=0.02 if platform.machine() == 'arm64' else 0) def test_errorbar3d(): """Tests limits, color styling, and legend for 3D errorbars.""" fig = plt.figure()