112 lines
4.7 KiB
Diff
112 lines
4.7 KiB
Diff
From e67b2eb6fb233085fb58e61217a946ea28f3649f Mon Sep 17 00:00:00 2001
|
|
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
|
Date: Fri, 14 Feb 2020 06:05:42 -0500
|
|
Subject: [PATCH 2/7] Set FreeType version to 2.10.1 and update tolerances.
|
|
|
|
Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
|
|
---
|
|
lib/matplotlib/__init__.py | 2 +-
|
|
lib/matplotlib/tests/test_axes.py | 4 ++--
|
|
lib/matplotlib/tests/test_constrainedlayout.py | 2 +-
|
|
lib/matplotlib/tests/test_polar.py | 2 +-
|
|
lib/matplotlib/tests/test_tightlayout.py | 10 +++++-----
|
|
setupext.py | 2 +-
|
|
6 files changed, 11 insertions(+), 11 deletions(-)
|
|
|
|
diff --git a/lib/matplotlib/__init__.py b/lib/matplotlib/__init__.py
|
|
index 809fff933..3c8cd20e0 100644
|
|
--- a/lib/matplotlib/__init__.py
|
|
+++ b/lib/matplotlib/__init__.py
|
|
@@ -1164,7 +1164,7 @@ default_test_modules = [
|
|
def _init_tests():
|
|
# The version of FreeType to install locally for running the
|
|
# tests. This must match the value in `setupext.py`
|
|
- LOCAL_FREETYPE_VERSION = '2.6.1'
|
|
+ LOCAL_FREETYPE_VERSION = '2.10.1'
|
|
|
|
from matplotlib import ft2font
|
|
if (ft2font.__freetype_version__ != LOCAL_FREETYPE_VERSION or
|
|
diff --git a/lib/matplotlib/tests/test_axes.py b/lib/matplotlib/tests/test_axes.py
|
|
index 2a61b232f..107936d19 100644
|
|
--- a/lib/matplotlib/tests/test_axes.py
|
|
+++ b/lib/matplotlib/tests/test_axes.py
|
|
@@ -5934,7 +5934,7 @@ def test_normal_axes():
|
|
]
|
|
for nn, b in enumerate(bbaxis):
|
|
targetbb = mtransforms.Bbox.from_bounds(*target[nn])
|
|
- assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=2)
|
|
+ assert_array_almost_equal(b.bounds, targetbb.bounds, decimal=0)
|
|
|
|
target = [
|
|
[150.0, 119.999, 930.0, 11.111],
|
|
@@ -5952,7 +5952,7 @@ def test_normal_axes():
|
|
|
|
target = [85.5138, 75.88888, 1021.11, 1017.11]
|
|
targetbb = mtransforms.Bbox.from_bounds(*target)
|
|
- assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=2)
|
|
+ assert_array_almost_equal(bbtb.bounds, targetbb.bounds, decimal=0)
|
|
|
|
# test that get_position roundtrips to get_window_extent
|
|
axbb = ax.get_position().transformed(fig.transFigure).bounds
|
|
diff --git a/lib/matplotlib/tests/test_constrainedlayout.py b/lib/matplotlib/tests/test_constrainedlayout.py
|
|
index 46e6b9663..593b3fb3e 100644
|
|
--- a/lib/matplotlib/tests/test_constrainedlayout.py
|
|
+++ b/lib/matplotlib/tests/test_constrainedlayout.py
|
|
@@ -398,4 +398,4 @@ def test_hidden_axes():
|
|
extents1 = np.copy(axs[0, 0].get_position().extents)
|
|
|
|
np.testing.assert_allclose(
|
|
- extents1, [0.045552, 0.548288, 0.47319, 0.982638], rtol=1e-5)
|
|
+ extents1, [0.045552, 0.548288, 0.47319, 0.982638], rtol=1e-2)
|
|
diff --git a/lib/matplotlib/tests/test_polar.py b/lib/matplotlib/tests/test_polar.py
|
|
index 100954ac3..3594a9224 100644
|
|
--- a/lib/matplotlib/tests/test_polar.py
|
|
+++ b/lib/matplotlib/tests/test_polar.py
|
|
@@ -311,7 +311,7 @@ def test_get_tightbbox_polar():
|
|
fig.canvas.draw()
|
|
bb = ax.get_tightbbox(fig.canvas.get_renderer())
|
|
assert_allclose(
|
|
- bb.extents, [107.7778, 29.2778, 539.7847, 450.7222], rtol=1e-03)
|
|
+ bb.extents, [107.7778, 29.2778, 539.7847, 450.7222], rtol=1)
|
|
|
|
|
|
@check_figures_equal(extensions=["png"])
|
|
diff --git a/lib/matplotlib/tests/test_tightlayout.py b/lib/matplotlib/tests/test_tightlayout.py
|
|
index 9ad2e0a9a..7c9085a31 100644
|
|
--- a/lib/matplotlib/tests/test_tightlayout.py
|
|
+++ b/lib/matplotlib/tests/test_tightlayout.py
|
|
@@ -171,12 +171,12 @@ def test_outward_ticks():
|
|
plt.tight_layout()
|
|
# These values were obtained after visual checking that they correspond
|
|
# to a tight layouting that did take the ticks into account.
|
|
- ans = [[[0.091, 0.607], [0.433, 0.933]],
|
|
- [[0.579, 0.607], [0.922, 0.933]],
|
|
- [[0.091, 0.140], [0.433, 0.466]],
|
|
- [[0.579, 0.140], [0.922, 0.466]]]
|
|
+ ans = [[[0.09, 0.61], [0.43, 0.93]],
|
|
+ [[0.58, 0.61], [0.92, 0.93]],
|
|
+ [[0.09, 0.14], [0.43, 0.47]],
|
|
+ [[0.58, 0.14], [0.92, 0.47]]]
|
|
for nn, ax in enumerate(fig.axes):
|
|
- assert_array_equal(np.round(ax.get_position().get_points(), 3),
|
|
+ assert_array_equal(np.round(ax.get_position().get_points(), 2),
|
|
ans[nn])
|
|
|
|
|
|
diff --git a/setupext.py b/setupext.py
|
|
index 4a838eedd..a084f881a 100644
|
|
--- a/setupext.py
|
|
+++ b/setupext.py
|
|
@@ -126,7 +126,7 @@ _freetype_hashes = {
|
|
# version. It must match the value in
|
|
# lib/matplotlib.__init__.py and also needs to be changed below in the
|
|
# embedded windows build script (grep for "REMINDER" in this file)
|
|
-LOCAL_FREETYPE_VERSION = '2.6.1'
|
|
+LOCAL_FREETYPE_VERSION = '2.10.1'
|
|
LOCAL_FREETYPE_HASH = _freetype_hashes.get(LOCAL_FREETYPE_VERSION, 'unknown')
|
|
|
|
|
|
--
|
|
2.25.4
|
|
|