Fix ppc64le/s390x tolerance patch.

This commit is contained in:
Elliott Sales de Andrade 2021-08-09 23:26:31 -04:00
parent 19bce65d7f
commit 6e121f315b

View File

@ -1,4 +1,4 @@
From 157025487ba0e446933068c01cd50f2c6691a19a Mon Sep 17 00:00:00 2001
From cc0a99e00aff1c05788396640938301cbdbcd32c Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Mon, 9 Aug 2021 21:38:15 -0400
Subject: [PATCH 6/6] Increase mathfont test tolerance on some systems.
@ -9,7 +9,7 @@ Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/matplotlib/tests/test_mathtext.py b/lib/matplotlib/tests/test_mathtext.py
index b5fd906d2f..726c226d27 100644
index b5fd906d2f..c475ef2cf4 100644
--- a/lib/matplotlib/tests/test_mathtext.py
+++ b/lib/matplotlib/tests/test_mathtext.py
@@ -1,5 +1,6 @@
@ -19,14 +19,14 @@ index b5fd906d2f..726c226d27 100644
import re
import numpy as np
@@ -189,7 +190,8 @@ def baseline_images(request, fontset, index, text):
@@ -213,7 +214,8 @@ def test_mathtext_rendering_lightweight(baseline_images, fontset, index, text):
@pytest.mark.parametrize(
'fontset', ['cm', 'stix', 'stixsans', 'dejavusans', 'dejavuserif'])
@pytest.mark.parametrize('baseline_images', ['mathtext'], indirect=True)
-@image_comparison(baseline_images=None)
+@image_comparison(baseline_images=None,
@pytest.mark.parametrize('baseline_images', ['mathfont'], indirect=True)
-@image_comparison(baseline_images=None, extensions=['png'])
+@image_comparison(baseline_images=None, extensions=['png'],
+ tol=0.011 if platform.machine() in ('ppc64le', 's390x') else 0)
def test_mathtext_rendering(baseline_images, fontset, index, text):
def test_mathfont_rendering(baseline_images, fontset, index, text):
mpl.rcParams['mathtext.fontset'] = fontset
fig = plt.figure(figsize=(5.25, 0.75))
--