python-matplotlib/0005-TST-Increase-some-tolerances-for-non-x86-arches.patch

50 lines
1.7 KiB
Diff
Raw Normal View History

2023-08-11 20:55:05 -04:00
From 7381c07409a36b4d3af029fbf66048658d55aa5c Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Fri, 11 Aug 2023 05:13:38 -0400
Subject: [PATCH 5/5] TST: Increase some tolerances for non-x86 arches
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
lib/matplotlib/tests/test_axes.py | 2 +-
lib/mpl_toolkits/mplot3d/tests/test_axes3d.py | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py
index c9687914c8..3a6edde772 100644
--- a/lib/matplotlib/tests/test_axes.py
+++ b/lib/matplotlib/tests/test_axes.py
@@ -2502,7 +2502,7 @@ def test_contour_hatching():
@image_comparison(
['contour_colorbar'], style='mpl20',
- tol=0.02 if platform.machine() in ('aarch64', 'ppc64le', 's390x') else 0)
+ tol=0.54 if platform.machine() in ('aarch64', 'ppc64le', 's390x') else 0)
def test_contour_colorbar():
x, y, z = contour_dat()
diff --git a/lib/mpl_toolkits/mplot3d/tests/test_axes3d.py b/lib/mpl_toolkits/mplot3d/tests/test_axes3d.py
index ad04b12526..644e2f2458 100644
--- a/lib/mpl_toolkits/mplot3d/tests/test_axes3d.py
+++ b/lib/mpl_toolkits/mplot3d/tests/test_axes3d.py
@@ -1,5 +1,6 @@
import functools
import itertools
+import platform
import pytest
@@ -217,7 +218,9 @@ def test_bar3d_lightsource():
np.testing.assert_array_max_ulp(color, collection._facecolor3d[1::6], 4)
-@mpl3d_image_comparison(['contour3d.png'], style='mpl20')
+@mpl3d_image_comparison(
+ ['contour3d.png'], style='mpl20',
+ tol=0.002 if platform.machine() in ('aarch64', 'ppc64le', 's390x') else 0)
def test_contour3d():
fig = plt.figure()
ax = fig.add_subplot(projection='3d')
--
2.41.0