diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py index 9cadbd7..1b6cdfb 100644 --- a/lib/matplotlib/tests/test_axes.py +++ b/lib/matplotlib/tests/test_axes.py @@ -5057,6 +5057,9 @@ def test_specgram_origin_kwarg(): plt.specgram(signal, origin='lower') +@pytest.mark.x86 +@pytest.mark.armv7 +@pytest.mark.armhf @image_comparison( ["psd_freqs.png", "csd_freqs.png", "psd_noise.png", "csd_noise.png"], remove_text=True, tol=0.002) diff --git a/lib/matplotlib/tests/test_figure.py b/lib/matplotlib/tests/test_figure.py index 48b4a88..aa9e637 100644 --- a/lib/matplotlib/tests/test_figure.py +++ b/lib/matplotlib/tests/test_figure.py @@ -1328,6 +1328,7 @@ def test_add_axes_kwargs(): plt.close() +@pytest.mark.x86 def test_ginput(recwarn): # recwarn undoes warn filters at exit. warnings.filterwarnings("ignore", "cannot show the figure") fig, ax = plt.subplots() diff --git a/lib/matplotlib/tests/test_font_manager.py b/lib/matplotlib/tests/test_font_manager.py index 2a34122..3011cb0 100644 --- a/lib/matplotlib/tests/test_font_manager.py +++ b/lib/matplotlib/tests/test_font_manager.py @@ -305,6 +305,7 @@ def test_fontentry_dataclass_invalid_path(): @pytest.mark.skipif(sys.platform == 'win32', reason='Linux or OS only') +@pytest.mark.skip(reason='Fails on builders') def test_get_font_names(): paths_mpl = [cbook._get_data_path('fonts', subdir) for subdir in ['ttf']] fonts_mpl = findSystemFonts(paths_mpl, fontext='ttf') diff --git a/lib/matplotlib/tests/test_polar.py b/lib/matplotlib/tests/test_polar.py index 942ffcb..a29a2bd 100644 --- a/lib/matplotlib/tests/test_polar.py +++ b/lib/matplotlib/tests/test_polar.py @@ -415,6 +415,7 @@ def test_axvline_axvspan_do_not_modify_rlims(): assert ax.get_ylim() == (0, .2) +@pytest.mark.x86 def test_cursor_precision(): ax = plt.subplot(projection="polar") # Higher radii correspond to higher theta-precisions. diff --git a/pytest.ini b/pytest.ini index f4a8057..5b3cff1 100644 --- a/pytest.ini +++ b/pytest.ini @@ -10,3 +10,11 @@ minversion = 3.6 testpaths = lib python_files = test_*.py junit_family = xunit2 +markers = + nonfunctional + x86_64 + x86 + ppc64le + s390x + armhf + armv7 --- ./lib/matplotlib/tests/test_triangulation.py.orig +++ ./lib/matplotlib/tests/test_triangulation.py @@ -882,6 +882,7 @@ plt.tricontour(tri_refi, z_test_refi, levels=levels, colors="black") +@pytest.mark.x86_64 @image_comparison(['tri_smooth_gradient.png'], remove_text=True, tol=0.092) def test_tri_smooth_gradient(): # Image comparison based on example trigradient_demo. --- ./lib/matplotlib/tests/test_legend.py.orig +++ ./lib/matplotlib/tests/test_legend.py @@ -486,6 +486,7 @@ "be discarded.") +@pytest.mark.nonfunctional def test_figure_legend_outside(): todos = ['upper ' + pos for pos in ['left', 'center', 'right']] todos += ['lower ' + pos for pos in ['left', 'center', 'right']] --- ./lib/matplotlib/tests/test_constrainedlayout.py.orig +++ ./lib/matplotlib/tests/test_constrainedlayout.py @@ -626,7 +626,8 @@ assert ppos.x0 > 0.2 assert ppos.y0 > 0.2 - +# test seems to be flaky, not sure if it's architecture dependent +@pytest.mark.nonfunctional def test_compressed1(): fig, axs = plt.subplots(3, 2, layout='compressed', sharex=True, sharey=True) --- ./lib/matplotlib/tests/test_image.py.orig +++ ./lib/matplotlib/tests/test_image.py @@ -893,6 +893,8 @@ ax2.imshow(Z.astype('>f8'), **kwargs) +@pytest.mark.x86 +@pytest.mark.ppc64le @image_comparison(['imshow_masked_interpolation'], tol=0 if platform.machine() == 'x86_64' else 0.01, remove_text=True, style='mpl20') --- ./lib/matplotlib/tests/test_colorbar.py.orig +++ ./lib/matplotlib/tests/test_colorbar.py @@ -235,6 +235,7 @@ assert ax.get_anchor() == 'E' +@pytest.mark.x86 @image_comparison( ['contour_colorbar.png'], remove_text=True, tol=0.01 if platform.machine() in ('aarch64', 'ppc64le', 's390x') else 0) --- ./lib/matplotlib/tests/test_widgets.py.orig +++ ./lib/matplotlib/tests/test_widgets.py @@ -1066,6 +1066,7 @@ check_props={'color': ['red', 'green', 'blue']}) +@pytest.mark.x86 @check_figures_equal(extensions=["png"]) def test_radio_buttons(fig_test, fig_ref): widgets.RadioButtons(fig_test.subplots(), ["tea", "coffee"]) @@ -1111,6 +1112,7 @@ cb.activecolor = 'green' +@pytest.mark.x86 @check_figures_equal(extensions=["png"]) def test_check_buttons(fig_test, fig_ref): widgets.CheckButtons(fig_test.subplots(), ["tea", "coffee"], [True, True]) @@ -1244,6 +1246,7 @@ assert slider.val == 5.5 +@pytest.mark.x86 def test_slider_horizontal_vertical(): fig, ax = plt.subplots() slider = widgets.Slider(ax=ax, label='', valmin=0, valmax=24, @@ -1317,6 +1320,7 @@ assert_allclose(handle_positions(slider), (0.1, 0.34)) +@pytest.mark.x86 @pytest.mark.parametrize("orientation", ["horizontal", "vertical"]) def test_range_slider_same_init_values(orientation): if orientation == "vertical": --- ./lib/matplotlib/tests/test_text.py.orig +++ ./lib/matplotlib/tests/test_text.py @@ -809,6 +809,7 @@ (r"Matplotlib currently does not support Bengali natively.",)]) +@pytest.mark.nonfunctional def test_parse_math(): fig, ax = plt.subplots() ax.text(0, 0, r"$ \wrong{math} $", parse_math=False) @@ -819,6 +820,7 @@ fig.canvas.draw() +@pytest.mark.nonfunctional def test_parse_math_rcparams(): # Default is True fig, ax = plt.subplots() --- ./lib/matplotlib/tests/test_image.py.orig +++ ./lib/matplotlib/tests/test_image.py @@ -141,6 +141,7 @@ ax.set_ylim([10, 20]) +@pytest.mark.armv7 @check_figures_equal() def test_imshow_pil(fig_test, fig_ref): style.use("default") @@ -208,6 +209,7 @@ plt.imsave(Path(os.devnull), np.array([[0, 1]]), format=fmt) +@pytest.mark.armv7 def test_imsave_color_alpha(): # Test that imsave accept arrays with ndim=3 where the third dimension is # color and alpha without raising any exceptions, and that the data is --- ./lib/matplotlib/tests/test_axes.py.orig +++ ./lib/matplotlib/tests/test_axes.py @@ -8424,6 +8424,7 @@ ax_ref.bar([1], [1]) +@pytest.mark.armhf @image_comparison(["extent_units.png"], style="mpl20") def test_extent_units(): _, axs = plt.subplots(2, 2) --- ./lib/matplotlib/tests/test_colorbar.py.orig +++ ./lib/matplotlib/tests/test_colorbar.py @@ -729,6 +729,7 @@ assert cbar3.ax.get_xlabel() == 'horizontal cbar' +@pytest.mark.armhf @image_comparison(['colorbar_keeping_xlabel.png'], style='mpl20') def test_keeping_xlabel(): # github issue #23398 - xlabels being ignored in colorbar axis --- ./lib/matplotlib/tests/test_colors.py.orig +++ ./lib/matplotlib/tests/test_colors.py @@ -952,6 +952,7 @@ plt.draw() +@pytest.mark.armhf @image_comparison(['light_source_shading_topo.png']) def test_light_source_topo_surface(): """Shades a DEM using different v.e.'s and blend modes.""" --- ./lib/matplotlib/tests/test_patheffects.py.orig +++ ./lib/matplotlib/tests/test_patheffects.py @@ -6,6 +6,7 @@ from matplotlib.path import Path import matplotlib.patches as patches +import pytest @image_comparison(['patheffect1'], remove_text=True) def test_patheffect1(): @@ -25,6 +25,7 @@ ax1.grid(True, linestyle="-", path_effects=pe) +@pytest.mark.armhf @image_comparison(['patheffect2'], remove_text=True, style='mpl20') def test_patheffect2(): --- ./lib/matplotlib/tests/test_png.py.orig +++ ./lib/matplotlib/tests/test_png.py @@ -7,6 +7,7 @@ from matplotlib import cm, pyplot as plt +@pytest.mark.armhf @image_comparison(['pngsuite.png'], tol=0.03) def test_pngsuite(): files = sorted( --- ./lib/matplotlib/tests/test_patches.py.orig +++ ./lib/matplotlib/tests/test_patches.py @@ -773,6 +773,7 @@ ell.angle = 45 +@pytest.mark.x86 @image_comparison(baseline_images=['annulus'], extensions=['png']) def test_annulus_setters2():