Skip to content

Commit 7deb36d

Browse files
committed
Increase tolerance for ppc64le and s390x.
These are mostly the same as the aarch64 tolerances, and also fail the same way on 32-bit systems (though this is hidden by the previous commit), so just increase tolerance everywhere but x86_64.
1 parent ed8237f commit 7deb36d

11 files changed

+15
-15
lines changed

lib/matplotlib/tests/test_arrow_patches.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def __prepare_fancyarrow_dpi_cor_test():
6767

6868

6969
@image_comparison(['fancyarrow_dpi_cor_100dpi.png'], remove_text=True,
70-
tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
70+
tol=0 if platform.machine() == 'x86_64' else 0.02,
7171
savefig_kwarg=dict(dpi=100))
7272
def test_fancyarrow_dpi_cor_100dpi():
7373
"""
@@ -82,7 +82,7 @@ def test_fancyarrow_dpi_cor_100dpi():
8282

8383

8484
@image_comparison(['fancyarrow_dpi_cor_200dpi.png'], remove_text=True,
85-
tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
85+
tol=0 if platform.machine() == 'x86_64' else 0.02,
8686
savefig_kwarg=dict(dpi=200))
8787
def test_fancyarrow_dpi_cor_200dpi():
8888
"""

lib/matplotlib/tests/test_axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3738,7 +3738,7 @@ def test_vertex_markers():
37383738

37393739

37403740
@image_comparison(['vline_hline_zorder', 'errorbar_zorder'],
3741-
tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
3741+
tol=0 if platform.machine() == 'x86_64' else 0.02)
37423742
def test_eb_line_zorder():
37433743
x = list(range(10))
37443744

lib/matplotlib/tests/test_contour.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def test_contour_datetime_axis():
191191

192192
@image_comparison(['contour_test_label_transforms.png'],
193193
remove_text=True, style='mpl20',
194-
tol={'aarch64': 0.08}.get(platform.machine(), 0))
194+
tol=0 if platform.machine() == 'x86_64' else 0.08)
195195
def test_labels():
196196
# Adapted from pylab_examples example code: contour_demo.py
197197
# 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.01}.get(platform.machine(), 0))
25+
tol=0 if platform.machine() == 'x86_64' else 0.01)
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.01}.get(platform.machine(), 0),
864+
tol=0 if platform.machine() == 'x86_64' else 0.01,
865865
remove_text=True, style='mpl20')
866866
def test_imshow_masked_interpolation():
867867

lib/matplotlib/tests/test_legend.py

Lines changed: 3 additions & 3 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.01}.get(platform.machine(), 0))
108+
tol=0 if platform.machine() == 'x86_64' else 0.01)
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.01}.get(platform.machine(), 0))
117+
tol=0 if platform.machine() == 'x86_64' else 0.01)
118118
def test_alpha_rcparam():
119119
fig, ax = plt.subplots(1, 1)
120120
ax.plot(range(10), lw=5)
@@ -140,7 +140,7 @@ def test_fancy():
140140

141141

142142
@image_comparison(['framealpha'], remove_text=True,
143-
tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
143+
tol=0 if platform.machine() == 'x86_64' else 0.02)
144144
def test_framealpha():
145145
x = np.linspace(1, 100, 100)
146146
y = x

lib/matplotlib/tests/test_pickle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def test_simple():
4141

4242

4343
@image_comparison(['multi_pickle.png'], remove_text=True, style='mpl20',
44-
tol={'aarch64': 0.082}.get(platform.machine(), 0.0))
44+
tol=0 if platform.machine() == 'x86_64' else 0.082)
4545
def test_complete():
4646
fig = plt.figure('Figure with a label?', figsize=(10, 6))
4747

lib/matplotlib/tests/test_polar.py

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

1111

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

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.01}.get(platform.machine(), 0))
77+
tol=0 if platform.machine() == 'x86_64' else 0.01)
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.01}.get(platform.machine(), 0))
104+
tol=0 if platform.machine() == 'x86_64' else 0.01)
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.01}.get(platform.machine(), 0))
334+
tol=0 if platform.machine() == 'x86_64' else 0.01)
335335
def test_anchored_direction_arrows():
336336
fig, ax = plt.subplots()
337337
ax.imshow(np.zeros((10, 10)), interpolation='nearest')

lib/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py

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

1818

1919
@image_comparison(['custom_transform.png'], style='default',
20-
tol={'aarch64': 0.034}.get(platform.machine(), 0.03))
20+
tol=0.03 if platform.machine() == 'x86_64' else 0.034)
2121
def test_custom_transform():
2222
class MyTransform(Transform):
2323
input_dims = output_dims = 2

0 commit comments

Comments
 (0)