92 lines
3.5 KiB
Diff
92 lines
3.5 KiB
Diff
From 6279bb6519e33fa875a30fab4fcf86d4f05adafd Mon Sep 17 00:00:00 2001
|
|
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
|
Date: Tue, 24 Aug 2021 04:47:50 -0400
|
|
Subject: [PATCH 5/6] Increase a few test tolerances on some arches.
|
|
|
|
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
|
---
|
|
lib/matplotlib/tests/test_axes.py | 6 ++++--
|
|
lib/matplotlib/tests/test_contour.py | 3 ++-
|
|
lib/matplotlib/tests/test_image.py | 4 ++--
|
|
lib/matplotlib/tests/test_lines.py | 4 +++-
|
|
4 files changed, 11 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py
|
|
index 5b6607a696..8233a436d5 100644
|
|
--- a/lib/matplotlib/tests/test_axes.py
|
|
+++ b/lib/matplotlib/tests/test_axes.py
|
|
@@ -867,7 +867,8 @@ def test_imshow():
|
|
ax.imshow("r", data=data)
|
|
|
|
|
|
-@image_comparison(['imshow_clip'], style='mpl20')
|
|
+@image_comparison(['imshow_clip'], style='mpl20',
|
|
+ tol=0 if platform.machine() == 'x86_64' else 1.24)
|
|
def test_imshow_clip():
|
|
# As originally reported by Gellule Xg <gellule.xg@free.fr>
|
|
# use former defaults to match existing baseline image
|
|
@@ -2059,7 +2060,8 @@ def test_contour_hatching():
|
|
extend='both', alpha=0.5)
|
|
|
|
|
|
-@image_comparison(['contour_colorbar'], style='mpl20')
|
|
+@image_comparison(['contour_colorbar'], style='mpl20',
|
|
+ tol=0 if platform.machine() == 'x86_64' else 0.02)
|
|
def test_contour_colorbar():
|
|
x, y, z = contour_dat()
|
|
|
|
diff --git a/lib/matplotlib/tests/test_contour.py b/lib/matplotlib/tests/test_contour.py
|
|
index 6396105f12..ea13615e4b 100644
|
|
--- a/lib/matplotlib/tests/test_contour.py
|
|
+++ b/lib/matplotlib/tests/test_contour.py
|
|
@@ -341,7 +341,8 @@ def test_contourf_log_extension():
|
|
|
|
|
|
@image_comparison(['contour_addlines.png'],
|
|
- remove_text=True, style='mpl20', tol=0.03)
|
|
+ remove_text=True, style='mpl20',
|
|
+ tol=0.03 if platform.machine() == 'x86_64' else 0.15)
|
|
# tolerance is because image changed minutely when tick finding on
|
|
# colorbars was cleaned up...
|
|
def test_contour_addlines():
|
|
diff --git a/lib/matplotlib/tests/test_image.py b/lib/matplotlib/tests/test_image.py
|
|
index 37dddd4e47..01a06378d8 100644
|
|
--- a/lib/matplotlib/tests/test_image.py
|
|
+++ b/lib/matplotlib/tests/test_image.py
|
|
@@ -1330,8 +1330,8 @@ def test_nonuniform_and_pcolor():
|
|
ax.set(xlim=(0, 10))
|
|
|
|
|
|
-@image_comparison(["rgba_antialias.png"], style="mpl20",
|
|
- remove_text=True)
|
|
+@image_comparison(["rgba_antialias.png"], style="mpl20", remove_text=True,
|
|
+ tol=0 if platform.machine() == 'x86_64' else 0.007)
|
|
def test_rgba_antialias():
|
|
fig, axs = plt.subplots(2, 2, figsize=(3.5, 3.5), sharex=False,
|
|
sharey=False, constrained_layout=True)
|
|
diff --git a/lib/matplotlib/tests/test_lines.py b/lib/matplotlib/tests/test_lines.py
|
|
index 21cb221405..f19542201c 100644
|
|
--- a/lib/matplotlib/tests/test_lines.py
|
|
+++ b/lib/matplotlib/tests/test_lines.py
|
|
@@ -3,6 +3,7 @@ Tests specific to the lines module.
|
|
"""
|
|
|
|
import itertools
|
|
+import platform
|
|
import timeit
|
|
from types import SimpleNamespace
|
|
|
|
@@ -150,7 +151,8 @@ def test_set_drawstyle():
|
|
assert len(line.get_path().vertices) == len(x)
|
|
|
|
|
|
-@image_comparison(['line_collection_dashes'], remove_text=True, style='mpl20')
|
|
+@image_comparison(['line_collection_dashes'], remove_text=True, style='mpl20',
|
|
+ tol=0 if platform.machine() == 'x86_64' else 0.62)
|
|
def test_set_line_coll_dash_image():
|
|
fig, ax = plt.subplots()
|
|
np.random.seed(0)
|
|
--
|
|
2.31.1
|
|
|