Package: matplotlib / 3.10.1+dfsg1-4

0008-Increase-test-tollerance.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
From: Sandro Tosi <morph@debian.org>
Date: Wed, 18 Jan 2017 20:05:24 -0500
Subject: Increase test tollerance

Patch taken from Fedora packaging:
http://pkgs.fedoraproject.org/cgit/rpms/python-matplotlib.git/plain/python-matplotlib-increase-tests-tolerance.patch
---
 lib/matplotlib/testing/decorators.py     | 2 +-
 lib/matplotlib/tests/test_mathtext.py    | 5 ++---
 lib/matplotlib/tests/test_patheffects.py | 2 +-
 3 files changed, 4 insertions(+), 5 deletions(-)

--- a/lib/matplotlib/testing/decorators.py
+++ b/lib/matplotlib/testing/decorators.py
@@ -256,7 +256,7 @@
     return decorator
 
 
-def image_comparison(baseline_images, extensions=None, tol=0,
+def image_comparison(baseline_images, extensions=None, tol=0.306,
                      freetype_version=None, remove_text=False,
                      savefig_kwarg=None,
                      # Default of mpl_test_settings fixture and cleanup too.
--- a/lib/matplotlib/tests/test_mathtext.py
+++ b/lib/matplotlib/tests/test_mathtext.py
@@ -214,7 +214,7 @@
     'fontset', ['cm', 'stix', 'stixsans', 'dejavusans', 'dejavuserif'])
 @pytest.mark.parametrize('baseline_images', ['mathtext'], indirect=True)
 @image_comparison(baseline_images=None,
-                  tol=0.011 if platform.machine() in ('ppc64le', 's390x') else 0)
+                  tol=0.310)
 def test_mathtext_rendering(baseline_images, fontset, index, text):
     mpl.rcParams['mathtext.fontset'] = fontset
     fig = plt.figure(figsize=(5.25, 0.75))
@@ -256,7 +256,7 @@
     'fontset', ['cm', 'stix', 'stixsans', 'dejavusans', 'dejavuserif'])
 @pytest.mark.parametrize('baseline_images', ['mathfont'], indirect=True)
 @image_comparison(baseline_images=None, extensions=['png'],
-                  tol=0.011 if platform.machine() in ('ppc64le', 's390x') else 0)
+                  tol=0.310)
 def test_mathfont_rendering(baseline_images, fontset, index, text):
     mpl.rcParams['mathtext.fontset'] = fontset
     fig = plt.figure(figsize=(5.25, 0.75))
--- a/lib/matplotlib/tests/test_patheffects.py
+++ b/lib/matplotlib/tests/test_patheffects.py
@@ -120,7 +120,7 @@
     assert pe._offset == (4, 5)
 
 
-@image_comparison(['collection'], tol=0.03, style='mpl20')
+@image_comparison(['collection'], tol=0.083, style='mpl20')
 def test_collection():
     x, y = np.meshgrid(np.linspace(0, 10, 150), np.linspace(-5, 5, 100))
     data = np.sin(x) + np.cos(y)