mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-09-22 14:11:36 +02:00
429 lines
12 KiB
Diff
429 lines
12 KiB
Diff
--- ./lib/matplotlib/tests/test_axes.py.old
|
|
+++ ./lib/matplotlib/tests/test_axes.py
|
|
@@ -3324,6 +3324,7 @@
|
|
plt.savefig(b, dpi=80, format='raw')
|
|
|
|
|
|
+@pytest.mark.nonfunctional
|
|
@image_comparison(['errorbar_basic', 'errorbar_mixed', 'errorbar_basic'])
|
|
def test_errorbar():
|
|
x = np.arange(0.1, 4, 0.5)
|
|
--- ./lib/matplotlib/tests/test_compare_images.py.old
|
|
+++ ./lib/matplotlib/tests/test_compare_images.py
|
|
@@ -9,6 +9,7 @@
|
|
|
|
|
|
# Tests of the image comparison algorithm.
|
|
+@pytest.mark.nonfunctional
|
|
@pytest.mark.parametrize(
|
|
'im1, im2, tol, expect_rms',
|
|
[
|
|
--- ./pytest.ini.old
|
|
+++ ./pytest.ini
|
|
@@ -5,3 +5,8 @@
|
|
testpaths = lib
|
|
python_files = test_*.py
|
|
junit_family = xunit2
|
|
+markers =
|
|
+ nonfunctional
|
|
+ x86
|
|
+ ppc64le
|
|
+ s390x
|
|
--- ./lib/matplotlib/tests/test_colorbar.py.old
|
|
+++ ./lib/matplotlib/tests/test_colorbar.py
|
|
@@ -186,6 +186,7 @@
|
|
anchor=(0.8, 0.5), shrink=0.6, use_gridspec=use_gridspec)
|
|
|
|
|
|
+@pytest.mark.x86
|
|
@image_comparison(['contour_colorbar.png'], remove_text=True)
|
|
def test_contour_colorbar():
|
|
fig, ax = plt.subplots(figsize=(4, 2))
|
|
--- ./lib/matplotlib/tests/test_figure.py.old
|
|
+++ ./lib/matplotlib/tests/test_figure.py
|
|
@@ -1225,6 +1225,7 @@
|
|
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()
|
|
--- ./lib/matplotlib/tests/test_image.py.old
|
|
+++ ./lib/matplotlib/tests/test_image.py
|
|
@@ -23,6 +23,7 @@
|
|
import pytest
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(['image_interps'], style='mpl20')
|
|
def test_image_interps():
|
|
"""Make the basic nearest, bilinear and bicubic interps."""
|
|
@@ -43,6 +44,7 @@
|
|
ax3.set_ylabel('bicubic')
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(['interp_alpha.png'], remove_text=True)
|
|
def test_alpha_interp():
|
|
"""Test the interpolation of the alpha channel on RGBA images"""
|
|
@@ -74,6 +76,7 @@
|
|
ax2.set_title('interpolation nearest')
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@pytest.mark.parametrize('suppressComposite', [False, True])
|
|
@image_comparison(['figimage'], extensions=['png', 'pdf'])
|
|
def test_figimage(suppressComposite):
|
|
@@ -254,6 +257,7 @@
|
|
assert tags["ImageDescription"] == "test image"
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(['image_alpha'], remove_text=True)
|
|
def test_image_alpha():
|
|
np.random.seed(0)
|
|
@@ -354,6 +358,7 @@
|
|
assert im.format_cursor_data(im.get_cursor_data(event)) == text
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(['image_clip'], style='mpl20')
|
|
def test_image_clip():
|
|
d = [[1, 2], [3, 4]]
|
|
@@ -364,6 +369,7 @@
|
|
im.set_clip_path(patch)
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(['image_cliprect'], style='mpl20')
|
|
def test_image_cliprect():
|
|
fig, ax = plt.subplots()
|
|
@@ -376,6 +382,7 @@
|
|
im.set_clip_path(rect)
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(['imshow'], remove_text=True, style='mpl20')
|
|
def test_imshow():
|
|
fig, ax = plt.subplots()
|
|
@@ -414,6 +421,7 @@
|
|
ax.imshow(arr)
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(['no_interpolation_origin'], remove_text=True)
|
|
def test_no_interpolation_origin():
|
|
fig, axs = plt.subplots(2)
|
|
@@ -462,6 +470,7 @@
|
|
assert g != 100, 'Expected a non-green edge - but sadly, it was.'
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(['image_composite_background'],
|
|
remove_text=True, style='mpl20')
|
|
def test_image_composite_background():
|
|
@@ -473,6 +482,7 @@
|
|
ax.set_xlim([0, 12])
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(['image_composite_alpha'], remove_text=True)
|
|
def test_image_composite_alpha():
|
|
"""
|
|
@@ -543,6 +553,7 @@
|
|
rcParams['savefig.dpi'] = 10
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(['bbox_image_inverted'], remove_text=True, style='mpl20')
|
|
def test_bbox_image_inverted():
|
|
# This is just used to produce an image to feed to BboxImage
|
|
@@ -589,6 +600,7 @@
|
|
assert_array_equal(im_bbox.get_points(), [[400, 200], [700, 900]])
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(['zoom_and_clip_upper_origin.png'],
|
|
remove_text=True, style='mpl20')
|
|
def test_zoom_and_clip_upper_origin():
|
|
@@ -726,6 +738,7 @@
|
|
plt.imread(file)
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(['log_scale_image'], remove_text=True)
|
|
def test_log_scale_image():
|
|
Z = np.zeros((10, 10))
|
|
@@ -741,6 +754,7 @@
|
|
# backend was modified to use indexed color, there are ten pixels that differ
|
|
# due to how the subpixel calculation is done when converting the PDF files to
|
|
# PNG images.
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(['rotate_image'], remove_text=True, tol=0.35)
|
|
def test_rotate_image():
|
|
delta = 0.25
|
|
@@ -803,6 +817,7 @@
|
|
np.identity(n, bool)[::-1])
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(['mask_image_over_under.png'], remove_text=True, tol=1.0)
|
|
def test_mask_image_over_under():
|
|
# Remove this line when this test image is regenerated.
|
|
@@ -837,6 +852,7 @@
|
|
orientation='horizontal', ax=ax2, aspect=10)
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(['mask_image'], remove_text=True)
|
|
def test_mask_image():
|
|
# Test mask image two ways: Using nans and using a masked array.
|
|
@@ -863,6 +879,7 @@
|
|
fig.canvas.draw_idle() # would emit a warning
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(['imshow_endianess.png'], remove_text=True)
|
|
def test_imshow_endianess():
|
|
x = np.arange(10)
|
|
@@ -877,6 +894,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')
|
|
@@ -938,6 +957,7 @@
|
|
assert out.dtype == np.uint8
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(['imshow_flatfield.png'], remove_text=True, style='mpl20')
|
|
def test_imshow_flatfield():
|
|
fig, ax = plt.subplots()
|
|
@@ -945,6 +965,7 @@
|
|
im.set_clim(.5, 1.5)
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(['imshow_bignumbers.png'], remove_text=True, style='mpl20')
|
|
def test_imshow_bignumbers():
|
|
rcParams['image.interpolation'] = 'nearest'
|
|
@@ -956,6 +977,7 @@
|
|
pc.set_clim(0, 5)
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(['imshow_bignumbers_real.png'],
|
|
remove_text=True, style='mpl20')
|
|
def test_imshow_bignumbers_real():
|
|
@@ -1307,6 +1329,7 @@
|
|
)
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(["nonuniform_and_pcolor.png"], style="mpl20")
|
|
def test_nonuniform_and_pcolor():
|
|
axs = plt.figure(figsize=(3, 3)).subplots(3, sharex=True, sharey=True)
|
|
@@ -1323,6 +1346,7 @@
|
|
ax.set(xlim=(0, 10))
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(["rgba_antialias.png"], style="mpl20",
|
|
remove_text=True)
|
|
def test_rgba_antialias():
|
|
--- ./lib/matplotlib/tests/test_polar.py.old
|
|
+++ ./lib/matplotlib/tests/test_polar.py
|
|
@@ -415,6 +415,7 @@
|
|
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.
|
|
--- ./lib/matplotlib/tests/test_widgets.py.old
|
|
+++ ./lib/matplotlib/tests/test_widgets.py
|
|
@@ -990,6 +990,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,
|
|
--- ./lib/matplotlib/tests/test_agg_filter.py.old
|
|
+++ ./lib/matplotlib/tests/test_agg_filter.py
|
|
@@ -1,4 +1,5 @@
|
|
import numpy as np
|
|
+import pytest
|
|
|
|
import matplotlib.pyplot as plt
|
|
from matplotlib.testing.decorators import image_comparison
|
|
@@ -4,6 +4,7 @@
|
|
from matplotlib.testing.decorators import image_comparison
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(baseline_images=['agg_filter_alpha'],
|
|
extensions=['png', 'pdf'])
|
|
def test_agg_filter_alpha():
|
|
--- ./lib/matplotlib/tests/test_agg.py.old
|
|
+++ ./lib/matplotlib/tests/test_agg.py
|
|
@@ -83,6 +83,7 @@
|
|
fig.savefig(buff, format='png')
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(['agg_filter.png'], remove_text=True)
|
|
def test_agg_filter():
|
|
def smooth1d(x, window_len):
|
|
--- ./lib/matplotlib/tests/test_axes.py.old
|
|
+++ ./lib/matplotlib/tests/test_axes.py
|
|
@@ -869,6 +869,7 @@
|
|
getattr(ax, plot_fun)(x, range(len(x)), color='C0')
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(['imshow', 'imshow'], remove_text=True, style='mpl20')
|
|
def test_imshow():
|
|
# use former defaults to match existing baseline image
|
|
@@ -890,6 +891,7 @@
|
|
ax.imshow("r", data=data)
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(['imshow_clip'], style='mpl20')
|
|
def test_imshow_clip():
|
|
# As originally reported by Gellule Xg <gellule.xg@free.fr>
|
|
@@ -4481,6 +4483,7 @@
|
|
assert ax.get_subplotspec().get_geometry() == (5, 1, 0, 0)
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(
|
|
["specgram_freqs.png", "specgram_freqs_linear.png",
|
|
"specgram_noise.png", "specgram_noise_linear.png"],
|
|
@@ -4517,6 +4520,7 @@
|
|
scale="linear", norm=matplotlib.colors.LogNorm())
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(
|
|
["specgram_magnitude_freqs.png", "specgram_magnitude_freqs_linear.png",
|
|
"specgram_magnitude_noise.png", "specgram_magnitude_noise_linear.png"],
|
|
@@ -4554,6 +4558,7 @@
|
|
scale="linear", norm=matplotlib.colors.LogNorm())
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(
|
|
["specgram_angle_freqs.png", "specgram_phase_freqs.png",
|
|
"specgram_angle_noise.png", "specgram_phase_noise.png"],
|
|
--- ./lib/matplotlib/tests/test_backend_svg.py.old
|
|
+++ ./lib/matplotlib/tests/test_backend_svg.py
|
|
@@ -44,6 +44,7 @@
|
|
ax.scatter(x=[0, 0.1, 1], y=[0, 0, 0], c='k', alpha=0.1, s=10000)
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(['noscale'], remove_text=True)
|
|
def test_noscale():
|
|
X, Y = np.meshgrid(np.arange(-5, 5, 1), np.arange(-5, 5, 1))
|
|
--- ./lib/matplotlib/tests/test_colors.py.old
|
|
+++ ./lib/matplotlib/tests/test_colors.py
|
|
@@ -897,6 +897,7 @@
|
|
plt.draw()
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@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_constrainedlayout.py.old
|
|
+++ ./lib/matplotlib/tests/test_constrainedlayout.py
|
|
@@ -446,6 +446,7 @@
|
|
cbs[3].ax.get_position().y0)
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(['test_colorbars_no_overlapV.png'],
|
|
remove_text=False, style='mpl20')
|
|
def test_colorbars_no_overlapV():
|
|
@@ -459,6 +460,7 @@
|
|
fig.suptitle("foo")
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(['test_colorbars_no_overlapH.png'],
|
|
remove_text=False, style='mpl20')
|
|
def test_colorbars_no_overlapH():
|
|
--- ./lib/matplotlib/tests/test_patheffects.py.old
|
|
+++ ./lib/matplotlib/tests/test_patheffects.py
|
|
@@ -1,4 +1,5 @@
|
|
import numpy as np
|
|
+import pytest
|
|
|
|
from matplotlib.testing.decorators import image_comparison
|
|
import matplotlib.pyplot as plt
|
|
@@ -7,6 +7,7 @@
|
|
import matplotlib.patches as patches
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(['patheffect1'], remove_text=True)
|
|
def test_patheffect1():
|
|
ax1 = plt.subplot()
|
|
@@ -25,6 +26,7 @@
|
|
ax1.grid(True, linestyle="-", path_effects=pe)
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(['patheffect2'], remove_text=True, style='mpl20')
|
|
def test_patheffect2():
|
|
|
|
--- ./lib/matplotlib/tests/test_pickle.py.old
|
|
+++ ./lib/matplotlib/tests/test_pickle.py
|
|
@@ -40,6 +40,7 @@
|
|
pickle.dump(fig, BytesIO(), pickle.HIGHEST_PROTOCOL)
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(
|
|
['multi_pickle.png'], remove_text=True, style='mpl20', tol=0.082)
|
|
def test_complete():
|
|
--- ./lib/matplotlib/tests/test_png.py.old
|
|
+++ ./lib/matplotlib/tests/test_png.py
|
|
@@ -8,6 +8,7 @@
|
|
import matplotlib.cm as cm
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(['pngsuite.png'], tol=0.03)
|
|
def test_pngsuite():
|
|
files = sorted(
|
|
--- ./lib/matplotlib/tests/test_tightlayout.py.old
|
|
+++ ./lib/matplotlib/tests/test_tightlayout.py
|
|
@@ -65,6 +65,7 @@
|
|
plt.tight_layout()
|
|
|
|
|
|
+@pytest.mark.ppc64le
|
|
@image_comparison(['tight_layout5'])
|
|
def test_tight_layout5():
|
|
"""Test tight_layout for image."""
|
|
--- ./lib/matplotlib/tests/test_font_manager.py.old
|
|
+++ ./lib/matplotlib/tests/test_font_manager.py
|
|
@@ -244,6 +244,7 @@
|
|
t.join()
|
|
|
|
|
|
+@pytest.mark.s390x
|
|
def test_fontcache_thread_safe():
|
|
pytest.importorskip('threading')
|
|
import inspect
|