From 928df2339ec6f8cc838f2b46c4bef4b10dc66c52 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Sat, 31 Mar 2018 00:15:14 -0400 Subject: [PATCH 4/4] Increase some tolerances for 32-bit systems. Signed-off-by: Elliott Sales de Andrade --- lib/matplotlib/testing/decorators.py | 2 +- lib/matplotlib/tests/test_artist.py | 2 +- lib/matplotlib/tests/test_axes.py | 48 +++++++++---------- lib/matplotlib/tests/test_collections.py | 2 +- lib/matplotlib/tests/test_colorbar.py | 10 ++-- .../tests/test_constrainedlayout.py | 2 +- lib/matplotlib/tests/test_contour.py | 6 +-- lib/matplotlib/tests/test_cycles.py | 9 ++-- lib/matplotlib/tests/test_figure.py | 3 +- lib/matplotlib/tests/test_image.py | 2 +- lib/matplotlib/tests/test_legend.py | 9 ++-- lib/matplotlib/tests/test_mathtext.py | 4 +- lib/matplotlib/tests/test_patches.py | 3 +- lib/matplotlib/tests/test_patheffects.py | 2 +- lib/matplotlib/tests/test_pickle.py | 2 +- lib/matplotlib/tests/test_quiver.py | 2 +- lib/matplotlib/tests/test_streamplot.py | 2 +- lib/matplotlib/tests/test_transforms.py | 2 +- lib/matplotlib/tests/test_units.py | 3 +- .../tests/test_axisartist_floating_axes.py | 4 +- ...test_axisartist_grid_helper_curvelinear.py | 7 ++- lib/mpl_toolkits/tests/test_mplot3d.py | 4 +- 22 files changed, 60 insertions(+), 70 deletions(-) diff --git a/lib/matplotlib/testing/decorators.py b/lib/matplotlib/testing/decorators.py index cd447976b..545bf2cfe 100644 --- a/lib/matplotlib/testing/decorators.py +++ b/lib/matplotlib/testing/decorators.py @@ -269,7 +269,7 @@ def _pytest_image_comparison(baseline_images, extensions, tol, return decorator -def image_comparison(baseline_images, extensions=None, tol=0, +def image_comparison(baseline_images, extensions=None, tol=0.1, freetype_version=None, remove_text=False, savefig_kwarg=None, # Default of mpl_test_settings fixture and cleanup too. diff --git a/lib/matplotlib/tests/test_artist.py b/lib/matplotlib/tests/test_artist.py index a598e822d..becc9b46d 100644 --- a/lib/matplotlib/tests/test_artist.py +++ b/lib/matplotlib/tests/test_artist.py @@ -94,7 +94,7 @@ def test_collection_transform_of_none(): assert isinstance(c._transOffset, mtransforms.IdentityTransform) -@image_comparison(["clip_path_clipping"], remove_text=True) +@image_comparison(["clip_path_clipping"], remove_text=True, tol=0.28) def test_clipping(): exterior = mpath.Path.unit_rectangle().deepcopy() exterior.vertices *= 4 diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py index b5bfc32c3..8bf3afb54 100644 --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py @@ -563,7 +563,7 @@ def test_single_point(): plt.plot('b', 'b', 'o', data=data) -@image_comparison(['single_date.png'], style='mpl20') +@image_comparison(['single_date.png'], style='mpl20', tol=1.97) def test_single_date(): # use former defaults to match existing baseline image plt.rcParams['axes.formatter.limits'] = -7, 7 @@ -1097,7 +1097,7 @@ def test_fill_between_interpolate(): @image_comparison(['fill_between_interpolate_decreasing'], - style='mpl20', remove_text=True) + style='mpl20', remove_text=True, tol=0.78) def test_fill_between_interpolate_decreasing(): p = np.array([724.3, 700, 655]) t = np.array([9.4, 7, 2.2]) @@ -1212,7 +1212,7 @@ def test_pcolormesh_alpha(): @image_comparison(['pcolormesh_datetime_axis.png'], - remove_text=False, style='mpl20') + remove_text=False, style='mpl20', tol=0.19) def test_pcolormesh_datetime_axis(): fig = plt.figure() fig.subplots_adjust(hspace=0.4, top=0.98, bottom=.15) @@ -1238,7 +1238,7 @@ def test_pcolormesh_datetime_axis(): @image_comparison(['pcolor_datetime_axis.png'], - remove_text=False, style='mpl20') + remove_text=False, style='mpl20', tol=0.19) def test_pcolor_datetime_axis(): fig = plt.figure() fig.subplots_adjust(hspace=0.4, top=0.98, bottom=.15) @@ -1294,7 +1294,8 @@ def test_canonical(): ax.plot([1, 2, 3]) -@image_comparison(['arc_angles.png'], remove_text=True, style='default') +@image_comparison(['arc_angles.png'], remove_text=True, style='default', + tol=0.17) def test_arc_angles(): from matplotlib import patches # Ellipse parameters @@ -2769,7 +2770,7 @@ def test_boxplot_mod_artist_after_plotting(): @image_comparison(['violinplot_vert_baseline.png', - 'violinplot_vert_baseline.png']) + 'violinplot_vert_baseline.png'], tol=0.24) def test_vert_violinplot_baseline(): # First 9 digits of frac(sqrt(2)) np.random.seed(414213562) @@ -2786,7 +2787,7 @@ def test_vert_violinplot_baseline(): showmedians=0, data=data) -@image_comparison(['violinplot_vert_showmeans.png']) +@image_comparison(['violinplot_vert_showmeans.png'], tol=0.23) def test_vert_violinplot_showmeans(): ax = plt.axes() # First 9 digits of frac(sqrt(3)) @@ -2796,7 +2797,7 @@ def test_vert_violinplot_showmeans(): showmedians=0) -@image_comparison(['violinplot_vert_showextrema.png']) +@image_comparison(['violinplot_vert_showextrema.png'], tol=0.23) def test_vert_violinplot_showextrema(): ax = plt.axes() # First 9 digits of frac(sqrt(5)) @@ -2806,7 +2807,7 @@ def test_vert_violinplot_showextrema(): showmedians=0) -@image_comparison(['violinplot_vert_showmedians.png']) +@image_comparison(['violinplot_vert_showmedians.png'], tol=0.23) def test_vert_violinplot_showmedians(): ax = plt.axes() # First 9 digits of frac(sqrt(7)) @@ -2816,7 +2817,7 @@ def test_vert_violinplot_showmedians(): showmedians=1) -@image_comparison(['violinplot_vert_showall.png']) +@image_comparison(['violinplot_vert_showall.png'], tol=0.2) def test_vert_violinplot_showall(): ax = plt.axes() # First 9 digits of frac(sqrt(11)) @@ -2827,7 +2828,7 @@ def test_vert_violinplot_showall(): quantiles=[[0.1, 0.9], [0.2, 0.8], [0.3, 0.7], [0.4, 0.6]]) -@image_comparison(['violinplot_vert_custompoints_10.png']) +@image_comparison(['violinplot_vert_custompoints_10.png'], tol=0.22) def test_vert_violinplot_custompoints_10(): ax = plt.axes() # First 9 digits of frac(sqrt(13)) @@ -2837,7 +2838,7 @@ def test_vert_violinplot_custompoints_10(): showmedians=0, points=10) -@image_comparison(['violinplot_vert_custompoints_200.png']) +@image_comparison(['violinplot_vert_custompoints_200.png'], tol=0.22) def test_vert_violinplot_custompoints_200(): ax = plt.axes() # First 9 digits of frac(sqrt(17)) @@ -2847,7 +2848,7 @@ def test_vert_violinplot_custompoints_200(): showmedians=0, points=200) -@image_comparison(['violinplot_horiz_baseline.png']) +@image_comparison(['violinplot_horiz_baseline.png'], tol=0.2) def test_horiz_violinplot_baseline(): ax = plt.axes() # First 9 digits of frac(sqrt(19)) @@ -2857,7 +2858,7 @@ def test_horiz_violinplot_baseline(): showextrema=0, showmedians=0) -@image_comparison(['violinplot_horiz_showmedians.png']) +@image_comparison(['violinplot_horiz_showmedians.png'], tol=0.23) def test_horiz_violinplot_showmedians(): ax = plt.axes() # First 9 digits of frac(sqrt(23)) @@ -2867,7 +2868,7 @@ def test_horiz_violinplot_showmedians(): showextrema=0, showmedians=1) -@image_comparison(['violinplot_horiz_showmeans.png']) +@image_comparison(['violinplot_horiz_showmeans.png'], tol=0.25) def test_horiz_violinplot_showmeans(): ax = plt.axes() # First 9 digits of frac(sqrt(29)) @@ -2877,7 +2878,7 @@ def test_horiz_violinplot_showmeans(): showextrema=0, showmedians=0) -@image_comparison(['violinplot_horiz_showextrema.png']) +@image_comparison(['violinplot_horiz_showextrema.png'], tol=0.2) def test_horiz_violinplot_showextrema(): ax = plt.axes() # First 9 digits of frac(sqrt(31)) @@ -2887,7 +2888,7 @@ def test_horiz_violinplot_showextrema(): showextrema=1, showmedians=0) -@image_comparison(['violinplot_horiz_showall.png']) +@image_comparison(['violinplot_horiz_showall.png'], tol=0.19) def test_horiz_violinplot_showall(): ax = plt.axes() # First 9 digits of frac(sqrt(37)) @@ -2898,7 +2899,7 @@ def test_horiz_violinplot_showall(): quantiles=[[0.1, 0.9], [0.2, 0.8], [0.3, 0.7], [0.4, 0.6]]) -@image_comparison(['violinplot_horiz_custompoints_10.png']) +@image_comparison(['violinplot_horiz_custompoints_10.png'], tol=0.22) def test_horiz_violinplot_custompoints_10(): ax = plt.axes() # First 9 digits of frac(sqrt(41)) @@ -2908,7 +2909,7 @@ def test_horiz_violinplot_custompoints_10(): showextrema=0, showmedians=0, points=10) -@image_comparison(['violinplot_horiz_custompoints_200.png']) +@image_comparison(['violinplot_horiz_custompoints_200.png'], tol=0.22) def test_horiz_violinplot_custompoints_200(): ax = plt.axes() # First 9 digits of frac(sqrt(43)) @@ -3672,8 +3673,7 @@ def test_vertex_markers(): ax.set_ylim([-1, 10]) -@image_comparison(['vline_hline_zorder', 'errorbar_zorder'], - tol={'aarch64': 0.02}.get(platform.machine(), 0.0)) +@image_comparison(['vline_hline_zorder', 'errorbar_zorder']) def test_eb_line_zorder(): x = list(range(10)) @@ -4360,7 +4360,7 @@ def test_psd_noise(): ax3.set_ylabel('') -@image_comparison(['csd_freqs.png'], remove_text=True, tol=0.002) +@image_comparison(['csd_freqs.png'], remove_text=True, tol=0.21) def test_csd_freqs(): '''test axes.csd with sinusoidal stimuli''' n = 10000 @@ -5264,7 +5264,7 @@ def test_rc_spines(): fig, ax = plt.subplots() -@image_comparison(['rc_grid.png'], savefig_kwarg={'dpi': 40}) +@image_comparison(['rc_grid.png'], savefig_kwarg={'dpi': 40}, tol=0.2) def test_rc_grid(): fig = plt.figure() rc_dict0 = { @@ -5806,7 +5806,7 @@ def test_date_timezone_y(): plt.plot_date([3] * 3, time_index, tz='UTC', xdate=False, ydate=True) -@image_comparison(['date_timezone_x_and_y.png']) +@image_comparison(['date_timezone_x_and_y.png'], tol=3.05) def test_date_timezone_x_and_y(): # Tests issue 5575 UTC = datetime.timezone.utc diff --git a/lib/matplotlib/tests/test_collections.py b/lib/matplotlib/tests/test_collections.py index 3f5b3bf1a..773573918 100644 --- a/lib/matplotlib/tests/test_collections.py +++ b/lib/matplotlib/tests/test_collections.py @@ -461,7 +461,7 @@ def test_EllipseCollection(): ax.autoscale_view() -@image_comparison(['polycollection_close.png'], remove_text=True) +@image_comparison(['polycollection_close.png'], remove_text=True, tol=0.45) def test_polycollection_close(): from mpl_toolkits.mplot3d import Axes3D diff --git a/lib/matplotlib/tests/test_colorbar.py b/lib/matplotlib/tests/test_colorbar.py index 6d1f39149..4d70f8506 100644 --- a/lib/matplotlib/tests/test_colorbar.py +++ b/lib/matplotlib/tests/test_colorbar.py @@ -95,7 +95,7 @@ def _colorbar_extension_length(spacing): @image_comparison(['colorbar_extensions_shape_uniform.png', - 'colorbar_extensions_shape_proportional.png']) + 'colorbar_extensions_shape_proportional.png'], tol=0.16) def test_colorbar_extension_shape(): '''Test rectangular colorbar extensions.''' # Create figures for uniform and proportionally spaced colorbars. @@ -104,7 +104,7 @@ def test_colorbar_extension_shape(): @image_comparison(['colorbar_extensions_uniform.png', - 'colorbar_extensions_proportional.png']) + 'colorbar_extensions_proportional.png'], tol=0.25) def test_colorbar_extension_length(): '''Test variable length colorbar extensions.''' # Create figures for uniform and proportionally spaced colorbars. @@ -118,7 +118,7 @@ def test_colorbar_extension_length(): 'cbar_sharing', ], extensions=['png'], remove_text=True, - savefig_kwarg={'dpi': 40}) + savefig_kwarg={'dpi': 40}, tol=0.17) def test_colorbar_positioning(): data = np.arange(1200).reshape(30, 40) levels = [0, 200, 400, 600, 800, 1000, 1200] @@ -171,7 +171,7 @@ def test_colorbar_positioning(): @image_comparison(['cbar_with_subplots_adjust.png'], remove_text=True, - savefig_kwarg={'dpi': 40}) + savefig_kwarg={'dpi': 40}, tol=0.17) def test_gridspec_make_colorbar(): plt.figure() data = np.arange(1200).reshape(30, 40) @@ -226,7 +226,7 @@ def test_colorbarbase(): ColorbarBase(ax, plt.cm.bone) -@image_comparison(['colorbar_closed_patch'], remove_text=True) +@image_comparison(['colorbar_closed_patch'], remove_text=True, tol=0.22) def test_colorbar_closed_patch(): fig = plt.figure(figsize=(8, 6)) ax1 = fig.add_axes([0.05, 0.85, 0.9, 0.1]) diff --git a/lib/matplotlib/tests/test_constrainedlayout.py b/lib/matplotlib/tests/test_constrainedlayout.py index 75311e70e..64e7bcd25 100644 --- a/lib/matplotlib/tests/test_constrainedlayout.py +++ b/lib/matplotlib/tests/test_constrainedlayout.py @@ -234,7 +234,7 @@ def test_constrained_layout12(): ax.set_xlabel('x-label') -@image_comparison(['constrained_layout13.png'], tol=2.e-2) +@image_comparison(['constrained_layout13.png'], tol=3e-2) def test_constrained_layout13(): 'Test that padding works.' fig, axs = plt.subplots(2, 2, constrained_layout=True) diff --git a/lib/matplotlib/tests/test_contour.py b/lib/matplotlib/tests/test_contour.py index 4aabd36a7..14a52920e 100644 --- a/lib/matplotlib/tests/test_contour.py +++ b/lib/matplotlib/tests/test_contour.py @@ -162,7 +162,7 @@ def test_given_colors_levels_and_extends(): @image_comparison(['contour_datetime_axis.png'], - remove_text=False, style='mpl20') + remove_text=False, style='mpl20', tol=0.18) def test_contour_datetime_axis(): fig = plt.figure() fig.subplots_adjust(hspace=0.4, top=0.98, bottom=.15) @@ -188,7 +188,7 @@ def test_contour_datetime_axis(): @image_comparison(['contour_test_label_transforms.png'], - remove_text=True, style='mpl20') + remove_text=True, style='mpl20', tol=1.38) def test_labels(): # Adapted from pylab_examples example code: contour_demo.py # see issues #2475, #2843, and #2818 for explanation @@ -219,7 +219,7 @@ def test_labels(): @image_comparison(['contour_corner_mask_False.png', 'contour_corner_mask_True.png'], - remove_text=True) + remove_text=True, tol=0.19) def test_corner_mask(): n = 60 mask_level = 0.95 diff --git a/lib/matplotlib/tests/test_cycles.py b/lib/matplotlib/tests/test_cycles.py index ee67b4e41..3ae6e4ebc 100644 --- a/lib/matplotlib/tests/test_cycles.py +++ b/lib/matplotlib/tests/test_cycles.py @@ -8,8 +8,7 @@ import pytest from cycler import cycler -@image_comparison(['color_cycle_basic.png'], remove_text=True, - tol={'aarch64': 0.02}.get(platform.machine(), 0.0)) +@image_comparison(['color_cycle_basic.png'], remove_text=True) def test_colorcycle_basic(): fig, ax = plt.subplots() ax.set_prop_cycle(cycler('color', ['r', 'g', 'y'])) @@ -25,8 +24,7 @@ def test_colorcycle_basic(): ax.legend(loc='upper left') -@image_comparison(['marker_cycle.png', 'marker_cycle.png'], remove_text=True, - tol={'aarch64': 0.02}.get(platform.machine(), 0.0)) +@image_comparison(['marker_cycle.png', 'marker_cycle.png'], remove_text=True) def test_marker_cycle(): fig, ax = plt.subplots() ax.set_prop_cycle(cycler('c', ['r', 'g', 'y']) + @@ -58,8 +56,7 @@ def test_marker_cycle(): ax.legend(loc='upper left') -@image_comparison(['lineprop_cycle_basic.png'], remove_text=True, - tol={'aarch64': 0.02}.get(platform.machine(), 0.0)) +@image_comparison(['lineprop_cycle_basic.png'], remove_text=True) def test_linestylecycle_basic(): fig, ax = plt.subplots() ax.set_prop_cycle(cycler('ls', ['-', '--', ':'])) diff --git a/lib/matplotlib/tests/test_figure.py b/lib/matplotlib/tests/test_figure.py index b5ca0ed5b..272fd6101 100644 --- a/lib/matplotlib/tests/test_figure.py +++ b/lib/matplotlib/tests/test_figure.py @@ -13,8 +13,7 @@ import numpy as np import pytest -@image_comparison(['figure_align_labels'], - tol={'aarch64': 0.02}.get(platform.machine(), 0.0)) +@image_comparison(['figure_align_labels']) def test_align_labels(): # Check the figure.align_labels() command fig = plt.figure(tight_layout=True) diff --git a/lib/matplotlib/tests/test_image.py b/lib/matplotlib/tests/test_image.py index 93cfbb260..6dcdac4dd 100644 --- a/lib/matplotlib/tests/test_image.py +++ b/lib/matplotlib/tests/test_image.py @@ -928,7 +928,7 @@ def test_imshow_endianess(): @image_comparison(['imshow_masked_interpolation'], - tol={'aarch64': 0.02}.get(platform.machine(), 0.0), + tol=0.25, remove_text=True, style='mpl20') def test_imshow_masked_interpolation(): diff --git a/lib/matplotlib/tests/test_legend.py b/lib/matplotlib/tests/test_legend.py index 71499da44..42413a5c1 100644 --- a/lib/matplotlib/tests/test_legend.py +++ b/lib/matplotlib/tests/test_legend.py @@ -105,8 +105,7 @@ def test_multiple_keys(): (p2, p1): HandlerTuple(ndivide=None, pad=0)}) -@image_comparison(['rgba_alpha.png'], remove_text=True, - tol={'aarch64': 0.02}.get(platform.machine(), 0.0)) +@image_comparison(['rgba_alpha.png'], remove_text=True) def test_alpha_rgba(): import matplotlib.pyplot as plt @@ -116,8 +115,7 @@ def test_alpha_rgba(): leg.legendPatch.set_facecolor([1, 0, 0, 0.5]) -@image_comparison(['rcparam_alpha.png'], remove_text=True, - tol={'aarch64': 0.02}.get(platform.machine(), 0.0)) +@image_comparison(['rcparam_alpha.png'], remove_text=True) def test_alpha_rcparam(): import matplotlib.pyplot as plt @@ -144,8 +142,7 @@ def test_fancy(): ncol=2, shadow=True, title="My legend", numpoints=1) -@image_comparison(['framealpha'], remove_text=True, - tol={'aarch64': 0.02}.get(platform.machine(), 0.0)) +@image_comparison(['framealpha'], remove_text=True) def test_framealpha(): x = np.linspace(1, 100, 100) y = x diff --git a/lib/matplotlib/tests/test_mathtext.py b/lib/matplotlib/tests/test_mathtext.py index 508e29fa0..f6862e631 100644 --- a/lib/matplotlib/tests/test_mathtext.py +++ b/lib/matplotlib/tests/test_mathtext.py @@ -172,7 +172,7 @@ def baseline_images(request, fontset, index): ['cm', 'stix', 'stixsans', 'dejavusans', 'dejavuserif']) @pytest.mark.parametrize('baseline_images', ['mathtext'], indirect=True) -@image_comparison(baseline_images=None) +@image_comparison(baseline_images=None, tol=0.31) def test_mathtext_rendering(baseline_images, fontset, index, test, recwarn): matplotlib.rcParams['mathtext.fontset'] = fontset fig = plt.figure(figsize=(5.25, 0.75)) @@ -186,7 +186,7 @@ def test_mathtext_rendering(baseline_images, fontset, index, test, recwarn): ['cm', 'stix', 'stixsans', 'dejavusans', 'dejavuserif']) @pytest.mark.parametrize('baseline_images', ['mathfont'], indirect=True) -@image_comparison(baseline_images=None, extensions=['png']) +@image_comparison(baseline_images=None, extensions=['png'], tol=0.3) def test_mathfont_rendering(baseline_images, fontset, index, test, recwarn): matplotlib.rcParams['mathtext.fontset'] = fontset fig = plt.figure(figsize=(5.25, 0.75)) diff --git a/lib/matplotlib/tests/test_patches.py b/lib/matplotlib/tests/test_patches.py index c0eda5542..62670dbbf 100644 --- a/lib/matplotlib/tests/test_patches.py +++ b/lib/matplotlib/tests/test_patches.py @@ -257,8 +257,7 @@ def test_wedge_movement(): assert getattr(w, attr) == new_v -# png needs tol>=0.06, pdf tol>=1.617 -@image_comparison(['wedge_range'], remove_text=True, tol=1.65 if on_win else 0) +@image_comparison(['wedge_range'], remove_text=True) def test_wedge_range(): ax = plt.axes() diff --git a/lib/matplotlib/tests/test_patheffects.py b/lib/matplotlib/tests/test_patheffects.py index eddd1a3a1..f6993ec31 100644 --- a/lib/matplotlib/tests/test_patheffects.py +++ b/lib/matplotlib/tests/test_patheffects.py @@ -115,7 +115,7 @@ def test_SimplePatchShadow_offset(): assert pe._offset == (4, 5) -@image_comparison(['collection'], tol=0.02, style='mpl20') +@image_comparison(['collection'], tol=0.084, style='mpl20') def test_collection(): x, y = np.meshgrid(np.linspace(0, 10, 150), np.linspace(-5, 5, 100)) data = np.sin(x) + np.cos(y) diff --git a/lib/matplotlib/tests/test_pickle.py b/lib/matplotlib/tests/test_pickle.py index 0fad3cdf2..aab0b29c6 100644 --- a/lib/matplotlib/tests/test_pickle.py +++ b/lib/matplotlib/tests/test_pickle.py @@ -41,7 +41,7 @@ def test_simple(): @image_comparison(['multi_pickle.png'], remove_text=True, style='mpl20', - tol={'aarch64': 0.082}.get(platform.machine(), 0.0)) + tol=0.11) def test_complete(): fig = plt.figure('Figure with a label?', figsize=(10, 6)) diff --git a/lib/matplotlib/tests/test_quiver.py b/lib/matplotlib/tests/test_quiver.py index 719c8fbc1..fd28062e1 100644 --- a/lib/matplotlib/tests/test_quiver.py +++ b/lib/matplotlib/tests/test_quiver.py @@ -173,7 +173,7 @@ def test_quiver_key_xy(): ax.quiverkey(q, X=x, Y=0.8, U=1, angle=angle, label='', color='b') -@image_comparison(['barbs_test_image.png'], remove_text=True) +@image_comparison(['barbs_test_image.png'], remove_text=True, tol=0.11) def test_barbs(): x = np.linspace(-5, 5, 5) X, Y = np.meshgrid(x, x) diff --git a/lib/matplotlib/tests/test_streamplot.py b/lib/matplotlib/tests/test_streamplot.py index 1afc60543..aa12ab5ea 100644 --- a/lib/matplotlib/tests/test_streamplot.py +++ b/lib/matplotlib/tests/test_streamplot.py @@ -40,7 +40,7 @@ def test_startpoints(): @image_comparison(['streamplot_colormap'], - tol=.04, remove_text=True, style='mpl20') + remove_text=True, style='mpl20') def test_colormap(): X, Y, U, V = velocity_field() plt.streamplot(X, Y, U, V, color=U, density=0.6, linewidth=2, diff --git a/lib/matplotlib/tests/test_transforms.py b/lib/matplotlib/tests/test_transforms.py index f35467ee7..b3ca0c020 100644 --- a/lib/matplotlib/tests/test_transforms.py +++ b/lib/matplotlib/tests/test_transforms.py @@ -68,7 +68,7 @@ def test_external_transform_api(): @image_comparison(['pre_transform_data'], - tol=0.08, remove_text=True, style='mpl20') + tol=0.155, remove_text=True, style='mpl20') def test_pre_transform_plotting(): # a catch-all for as many as possible plot layouts which handle # pre-transforming the data NOTE: The axis range is important in this diff --git a/lib/matplotlib/tests/test_units.py b/lib/matplotlib/tests/test_units.py index f14425144..c1afffcaa 100644 --- a/lib/matplotlib/tests/test_units.py +++ b/lib/matplotlib/tests/test_units.py @@ -73,8 +73,7 @@ def quantity_converter(): # 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.02}.get(platform.machine(), 0.0)) +@image_comparison(['plot_pint.png'], remove_text=False, style='mpl20') def test_numpy_facade(quantity_converter): # use former defaults to match existing baseline image plt.rcParams['axes.formatter.limits'] = -7, 7 diff --git a/lib/mpl_toolkits/tests/test_axisartist_floating_axes.py b/lib/mpl_toolkits/tests/test_axisartist_floating_axes.py index e69b63f99..0c2dd5660 100644 --- a/lib/mpl_toolkits/tests/test_axisartist_floating_axes.py +++ b/lib/mpl_toolkits/tests/test_axisartist_floating_axes.py @@ -18,7 +18,7 @@ def test_subplot(): fig.add_subplot(ax) -@image_comparison(['curvelinear3.png'], style='default', tol=0.01) +@image_comparison(['curvelinear3.png'], style='default', tol=0.02) def test_curvelinear3(): fig = plt.figure(figsize=(5, 5)) @@ -72,7 +72,7 @@ def test_curvelinear3(): l.set_clip_path(ax1.patch) -@image_comparison(['curvelinear4.png'], style='default', tol=0.015) +@image_comparison(['curvelinear4.png'], style='default', tol=0.055) def test_curvelinear4(): # Remove this line when this test image is regenerated. plt.rcParams['text.kerning_factor'] = 6 diff --git a/lib/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py b/lib/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py index 611908063..8add49b46 100644 --- a/lib/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py +++ b/lib/mpl_toolkits/tests/test_axisartist_grid_helper_curvelinear.py @@ -16,8 +16,7 @@ from mpl_toolkits.axisartist.grid_helper_curvelinear import \ GridHelperCurveLinear -@image_comparison(['custom_transform.png'], style='default', - tol={'aarch64': 0.034}.get(platform.machine(), 0.03)) +@image_comparison(['custom_transform.png'], style='default', tol=0.035) def test_custom_transform(): class MyTransform(Transform): input_dims = 2 @@ -84,7 +83,7 @@ def test_custom_transform(): @image_comparison(['polar_box.png'], style='default', - tol={'aarch64': 0.04}.get(platform.machine(), 0.03)) + tol=0.08) def test_polar_box(): # Remove this line when this test image is regenerated. plt.rcParams['text.kerning_factor'] = 6 @@ -147,7 +146,7 @@ def test_polar_box(): ax1.grid(True) -@image_comparison(['axis_direction.png'], style='default', tol=0.03) +@image_comparison(['axis_direction.png'], style='default', tol=0.05) def test_axis_direction(): # Remove this line when this test image is regenerated. plt.rcParams['text.kerning_factor'] = 6 diff --git a/lib/mpl_toolkits/tests/test_mplot3d.py b/lib/mpl_toolkits/tests/test_mplot3d.py index 592096b74..69ac5a2b3 100644 --- a/lib/mpl_toolkits/tests/test_mplot3d.py +++ b/lib/mpl_toolkits/tests/test_mplot3d.py @@ -280,7 +280,7 @@ def test_text3d(): ax.set_zlabel('Z axis') -@image_comparison(['trisurf3d.png'], remove_text=True, tol=0.03) +@image_comparison(['trisurf3d.png'], remove_text=True, tol=0.05) def test_trisurf3d(): n_angles = 36 n_radii = 8 @@ -756,7 +756,7 @@ class TestVoxels: assert voxels[coord], "faces returned for absent voxel" assert isinstance(poly, art3d.Poly3DCollection) - @image_comparison(['voxels-xyz.png'], tol=0.01) + @image_comparison(['voxels-xyz.png'], tol=0.02) def test_xyz(self): fig, ax = plt.subplots(subplot_kw={"projection": "3d"}) -- 2.25.4