Skip to content

Commit ed8237f

Browse files
committed
Update aarch64 tolerances.
1 parent e7dfc22 commit ed8237f

11 files changed

+18
-21
lines changed

lib/matplotlib/tests/test_backend_pgf.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
import numpy as np
1010
import pytest
11-
import platform
1211

1312
import matplotlib as mpl
1413
import matplotlib.pyplot as plt
@@ -179,10 +178,7 @@ def test_pathclip():
179178
# test mixed mode rendering
180179
@needs_xelatex
181180
@pytest.mark.backend('pgf')
182-
@image_comparison(['pgf_mixedmode.pdf'], style='default',
183-
tol={'aarch64': 1.086, 'x86_64': 1.086}.get(
184-
platform.machine(), 0.0
185-
))
181+
@image_comparison(['pgf_mixedmode.pdf'], style='default')
186182
def test_mixedmode():
187183
rc_xelatex = {'font.family': 'serif',
188184
'pgf.rcfonts': False}

lib/matplotlib/tests/test_collections.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import io
2-
import platform
32
from types import SimpleNamespace
43

54
import numpy as np
@@ -334,8 +333,7 @@ def test_barb_limits():
334333
decimal=1)
335334

336335

337-
@image_comparison(['EllipseCollection_test_image.png'], remove_text=True,
338-
tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
336+
@image_comparison(['EllipseCollection_test_image.png'], remove_text=True)
339337
def test_EllipseCollection():
340338
# Test basic functionality
341339
fig, ax = plt.subplots()

lib/matplotlib/tests/test_contour.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import datetime
2+
import platform
23
import re
34

45
import numpy as np
@@ -189,7 +190,8 @@ def test_contour_datetime_axis():
189190

190191

191192
@image_comparison(['contour_test_label_transforms.png'],
192-
remove_text=True, style='mpl20')
193+
remove_text=True, style='mpl20',
194+
tol={'aarch64': 0.08}.get(platform.machine(), 0))
193195
def test_labels():
194196
# Adapted from pylab_examples example code: contour_demo.py
195197
# see issues #2475, #2843, and #2818 for explanation

lib/matplotlib/tests/test_figure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323

2424
@image_comparison(['figure_align_labels'],
25-
tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
25+
tol={'aarch64': 0.01}.get(platform.machine(), 0))
2626
def test_align_labels():
2727
fig = plt.figure(tight_layout=True)
2828
gs = gridspec.GridSpec(3, 3)

lib/matplotlib/tests/test_image.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,7 @@ def test_imshow_endianess():
861861

862862

863863
@image_comparison(['imshow_masked_interpolation'],
864-
tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
864+
tol={'aarch64': 0.01}.get(platform.machine(), 0),
865865
remove_text=True, style='mpl20')
866866
def test_imshow_masked_interpolation():
867867

lib/matplotlib/tests/test_legend.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def test_multiple_keys():
105105

106106

107107
@image_comparison(['rgba_alpha.png'], remove_text=True,
108-
tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
108+
tol={'aarch64': 0.01}.get(platform.machine(), 0))
109109
def test_alpha_rgba():
110110
fig, ax = plt.subplots(1, 1)
111111
ax.plot(range(10), lw=5)
@@ -114,7 +114,7 @@ def test_alpha_rgba():
114114

115115

116116
@image_comparison(['rcparam_alpha.png'], remove_text=True,
117-
tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
117+
tol={'aarch64': 0.01}.get(platform.machine(), 0))
118118
def test_alpha_rcparam():
119119
fig, ax = plt.subplots(1, 1)
120120
ax.plot(range(10), lw=5)

lib/matplotlib/tests/test_patheffects.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def test_SimplePatchShadow_offset():
115115
assert pe._offset == (4, 5)
116116

117117

118-
@image_comparison(['collection'], tol=0.02, style='mpl20')
118+
@image_comparison(['collection'], tol=0.03, style='mpl20')
119119
def test_collection():
120120
x, y = np.meshgrid(np.linspace(0, 10, 150), np.linspace(-5, 5, 100))
121121
data = np.sin(x) + np.cos(y)

lib/matplotlib/tests/test_polar.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import platform
2+
13
import numpy as np
24
from numpy.testing import assert_allclose
35
import pytest
@@ -7,7 +9,8 @@
79
from matplotlib.testing.decorators import image_comparison, check_figures_equal
810

911

10-
@image_comparison(['polar_axes'], style='default')
12+
@image_comparison(['polar_axes'], style='default',
13+
tol={'aarch64': 0.01}.get(platform.machine(), 0))
1114
def test_polar_annotations():
1215
# You can specify the xypoint and the xytext in different positions and
1316
# coordinate systems, and optionally turn on a connecting line and mark the

lib/matplotlib/tests/test_streamplot.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import sys
2-
import platform
32

43
import numpy as np
54
from numpy.testing import assert_array_almost_equal
@@ -48,8 +47,7 @@ def test_colormap():
4847
plt.colorbar()
4948

5049

51-
@image_comparison(['streamplot_linewidth'], remove_text=True, style='mpl20',
52-
tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
50+
@image_comparison(['streamplot_linewidth'], remove_text=True, style='mpl20')
5351
def test_linewidth():
5452
X, Y, U, V = velocity_field()
5553
speed = np.hypot(U, V)

lib/matplotlib/tests/test_units.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def default_units(value, axis):
7474
# Tests that the conversion machinery works properly for classes that
7575
# work as a facade over numpy arrays (like pint)
7676
@image_comparison(['plot_pint.png'], remove_text=False, style='mpl20',
77-
tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
77+
tol={'aarch64': 0.01}.get(platform.machine(), 0))
7878
def test_numpy_facade(quantity_converter):
7979
# use former defaults to match existing baseline image
8080
plt.rcParams['axes.formatter.limits'] = -7, 7
@@ -101,7 +101,7 @@ def test_numpy_facade(quantity_converter):
101101

102102
# Tests gh-8908
103103
@image_comparison(['plot_masked_units.png'], remove_text=True, style='mpl20',
104-
tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
104+
tol={'aarch64': 0.01}.get(platform.machine(), 0))
105105
def test_plot_masked_units():
106106
data = np.linspace(-5, 5)
107107
data_masked = np.ma.array(data, mask=(data > -2) & (data < 2))

lib/mpl_toolkits/tests/test_axes_grid1.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ def test_zooming_with_inverted_axes():
331331

332332

333333
@image_comparison(['anchored_direction_arrows.png'],
334-
tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
334+
tol={'aarch64': 0.01}.get(platform.machine(), 0))
335335
def test_anchored_direction_arrows():
336336
fig, ax = plt.subplots()
337337
ax.imshow(np.zeros((10, 10)), interpolation='nearest')

0 commit comments

Comments
 (0)