Skip to content

Commit

Permalink
Increase tolerance for ppc64le and s390x.
Browse files Browse the repository at this point in the history
These are mostly the same as the aarch64 increased tolerances.
  • Loading branch information
QuLogic committed Jun 30, 2020
1 parent 1dee760 commit c2c0e34
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 15 deletions.
6 changes: 4 additions & 2 deletions lib/matplotlib/tests/test_arrow_patches.py
Expand Up @@ -67,7 +67,8 @@ def __prepare_fancyarrow_dpi_cor_test():


@image_comparison(['fancyarrow_dpi_cor_100dpi.png'], remove_text=True,
tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
tol={'aarch64': 0.02, 'ppc64le': 0.02,
's390x': 0.02}.get(platform.machine(), 0),
savefig_kwarg=dict(dpi=100))
def test_fancyarrow_dpi_cor_100dpi():
"""
Expand All @@ -82,7 +83,8 @@ def test_fancyarrow_dpi_cor_100dpi():


@image_comparison(['fancyarrow_dpi_cor_200dpi.png'], remove_text=True,
tol={'aarch64': 0.02}.get(platform.machine(), 0.0),
tol={'aarch64': 0.02, 'ppc64le': 0.02,
's390x': 0.02}.get(platform.machine(), 0),
savefig_kwarg=dict(dpi=200))
def test_fancyarrow_dpi_cor_200dpi():
"""
Expand Down
3 changes: 2 additions & 1 deletion lib/matplotlib/tests/test_axes.py
Expand Up @@ -3738,7 +3738,8 @@ def test_vertex_markers():


@image_comparison(['vline_hline_zorder', 'errorbar_zorder'],
tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
tol={'aarch64': 0.02, 'ppc64le': 0.02,
's390x': 0.02}.get(platform.machine(), 0))
def test_eb_line_zorder():
x = list(range(10))

Expand Down
3 changes: 2 additions & 1 deletion lib/matplotlib/tests/test_contour.py
Expand Up @@ -191,7 +191,8 @@ def test_contour_datetime_axis():

@image_comparison(['contour_test_label_transforms.png'],
remove_text=True, style='mpl20',
tol={'aarch64': 0.08}.get(platform.machine(), 0))
tol={'aarch64': 0.08, 'ppc64le': 0.08,
's390x': 0.08}.get(platform.machine(), 0))
def test_labels():
# Adapted from pylab_examples example code: contour_demo.py
# see issues #2475, #2843, and #2818 for explanation
Expand Down
3 changes: 2 additions & 1 deletion lib/matplotlib/tests/test_figure.py
Expand Up @@ -22,7 +22,8 @@


@image_comparison(['figure_align_labels'],
tol={'aarch64': 0.01}.get(platform.machine(), 0))
tol={'aarch64': 0.01, 'ppc64le': 0.01,
's390x': 0.01}.get(platform.machine(), 0))
def test_align_labels():
fig = plt.figure(tight_layout=True)
gs = gridspec.GridSpec(3, 3)
Expand Down
3 changes: 2 additions & 1 deletion lib/matplotlib/tests/test_image.py
Expand Up @@ -861,7 +861,8 @@ def test_imshow_endianess():


@image_comparison(['imshow_masked_interpolation'],
tol={'aarch64': 0.01}.get(platform.machine(), 0),
tol={'aarch64': 0.01, 'ppc64le': 0.01,
's390x': 0.01}.get(platform.machine(), 0),
remove_text=True, style='mpl20')
def test_imshow_masked_interpolation():

Expand Down
9 changes: 6 additions & 3 deletions lib/matplotlib/tests/test_legend.py
Expand Up @@ -105,7 +105,8 @@ def test_multiple_keys():


@image_comparison(['rgba_alpha.png'], remove_text=True,
tol={'aarch64': 0.01}.get(platform.machine(), 0))
tol={'aarch64': 0.01, 'ppc64le': 0.01,
's390x': 0.01}.get(platform.machine(), 0))
def test_alpha_rgba():
fig, ax = plt.subplots(1, 1)
ax.plot(range(10), lw=5)
Expand All @@ -114,7 +115,8 @@ def test_alpha_rgba():


@image_comparison(['rcparam_alpha.png'], remove_text=True,
tol={'aarch64': 0.01}.get(platform.machine(), 0))
tol={'aarch64': 0.01, 'ppc64le': 0.01,
's390x': 0.01}.get(platform.machine(), 0))
def test_alpha_rcparam():
fig, ax = plt.subplots(1, 1)
ax.plot(range(10), lw=5)
Expand All @@ -140,7 +142,8 @@ def test_fancy():


@image_comparison(['framealpha'], remove_text=True,
tol={'aarch64': 0.02}.get(platform.machine(), 0.0))
tol={'aarch64': 0.02, 'ppc64le': 0.02,
's390x': 0.02}.get(platform.machine(), 0))
def test_framealpha():
x = np.linspace(1, 100, 100)
y = x
Expand Down
3 changes: 2 additions & 1 deletion lib/matplotlib/tests/test_pickle.py
Expand Up @@ -41,7 +41,8 @@ def test_simple():


@image_comparison(['multi_pickle.png'], remove_text=True, style='mpl20',
tol={'aarch64': 0.082}.get(platform.machine(), 0.0))
tol={'aarch64': 0.082, 'ppc64le': 0.082,
's390x': 0.082}.get(platform.machine(), 0))
def test_complete():
fig = plt.figure('Figure with a label?', figsize=(10, 6))

Expand Down
3 changes: 2 additions & 1 deletion lib/matplotlib/tests/test_polar.py
Expand Up @@ -10,7 +10,8 @@


@image_comparison(['polar_axes'], style='default',
tol={'aarch64': 0.01}.get(platform.machine(), 0))
tol={'aarch64': 0.01, 'ppc64le': 0.01,
's390x': 0.01}.get(platform.machine(), 0))
def test_polar_annotations():
# You can specify the xypoint and the xytext in different positions and
# coordinate systems, and optionally turn on a connecting line and mark the
Expand Down
6 changes: 4 additions & 2 deletions lib/matplotlib/tests/test_units.py
Expand Up @@ -74,7 +74,8 @@ def default_units(value, axis):
# Tests that the conversion machinery works properly for classes that
# work as a facade over numpy arrays (like pint)
@image_comparison(['plot_pint.png'], remove_text=False, style='mpl20',
tol={'aarch64': 0.01}.get(platform.machine(), 0))
tol={'aarch64': 0.01, 'ppc64le': 0.01,
's390x': 0.01}.get(platform.machine(), 0))
def test_numpy_facade(quantity_converter):
# use former defaults to match existing baseline image
plt.rcParams['axes.formatter.limits'] = -7, 7
Expand All @@ -101,7 +102,8 @@ def test_numpy_facade(quantity_converter):

# Tests gh-8908
@image_comparison(['plot_masked_units.png'], remove_text=True, style='mpl20',
tol={'aarch64': 0.01}.get(platform.machine(), 0))
tol={'aarch64': 0.01, 'ppc64le': 0.01,
's390x': 0.01}.get(platform.machine(), 0))
def test_plot_masked_units():
data = np.linspace(-5, 5)
data_masked = np.ma.array(data, mask=(data > -2) & (data < 2))
Expand Down
3 changes: 2 additions & 1 deletion lib/mpl_toolkits/tests/test_axes_grid1.py
Expand Up @@ -331,7 +331,8 @@ def test_zooming_with_inverted_axes():


@image_comparison(['anchored_direction_arrows.png'],
tol={'aarch64': 0.01}.get(platform.machine(), 0))
tol={'aarch64': 0.01, 'ppc64le': 0.01,
's390x': 0.01}.get(platform.machine(), 0))
def test_anchored_direction_arrows():
fig, ax = plt.subplots()
ax.imshow(np.zeros((10, 10)), interpolation='nearest')
Expand Down
Expand Up @@ -17,7 +17,8 @@


@image_comparison(['custom_transform.png'], style='default',
tol={'aarch64': 0.034}.get(platform.machine(), 0.03))
tol={'aarch64': 0.034, 'ppc64le': 0.034,
's390x': 0.034}.get(platform.machine(), 0.03))
def test_custom_transform():
class MyTransform(Transform):
input_dims = output_dims = 2
Expand Down

0 comments on commit c2c0e34

Please sign in to comment.