Blob Blame History Raw
From 736a33a0b2814c93449c0a3f42b37f2862e5a746 Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Mon, 26 Feb 2018 02:42:50 -0500
Subject: [PATCH] Increase tolerance for new FreeType.

Signed-off-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
---
 lib/cartopy/tests/mpl/test_examples.py  | 2 +-
 lib/cartopy/tests/mpl/test_gridliner.py | 7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/lib/cartopy/tests/mpl/test_examples.py b/lib/cartopy/tests/mpl/test_examples.py
index db2b49bb..bf77ab9a 100644
--- a/lib/cartopy/tests/mpl/test_examples.py
+++ b/lib/cartopy/tests/mpl/test_examples.py
@@ -49,7 +49,7 @@ def test_global_map():
 
 contour_image = 'contour_label' if MPL_VERSION < '3.4' else 'contour_label_3.4'
 @pytest.mark.natural_earth
-@ExampleImageTesting([contour_image], tolerance=0)
+@ExampleImageTesting([contour_image], tolerance=10.1)
 def test_contour_label():
     from cartopy.tests.mpl.test_caching import sample_data
     fig = plt.figure()
diff --git a/lib/cartopy/tests/mpl/test_gridliner.py b/lib/cartopy/tests/mpl/test_gridliner.py
index ac73b5d6..cd19133f 100644
--- a/lib/cartopy/tests/mpl/test_gridliner.py
+++ b/lib/cartopy/tests/mpl/test_gridliner.py
@@ -136,6 +136,11 @@ grid_label_image = 'gridliner_labels'
 grid_label_inline_image = 'gridliner_labels_inline'
 grid_label_inline_usa_image = 'gridliner_labels_inline_usa'
 
+# Force higher tolerance due to new FreeType on Fedora.
+grid_label_tol = 41.5
+grid_label_inline_tol = 10.6
+grid_label_inline_usa_tol = 11.5
+
 
 @pytest.mark.skipif(geos_version == (3, 9, 0), reason="GEOS intersection bug")
 @pytest.mark.natural_earth
@@ -215,7 +220,7 @@ def test_grid_labels():
 @pytest.mark.natural_earth
 @ImageTesting(['gridliner_labels_tight'],
               tolerance=grid_label_tol if ccrs.PROJ4_VERSION < (7, 1, 0)
-              else 4)
+              else 48)
 def test_grid_labels_tight():
     # Ensure tight layout accounts for gridlines
     fig = plt.figure(figsize=(7, 5))
-- 
2.29.2