Update patch for tests skipped with GEOS 3.9.0.

This commit is contained in:
Elliott Sales de Andrade 2021-03-13 03:31:58 -05:00
commit 4205ee9b1f

View file

@ -1,4 +1,4 @@
From 267c98c20ef5bb0ebdd1dcc64f692013f2d0ca22 Mon Sep 17 00:00:00 2001
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.
@ -6,8 +6,8 @@ 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 | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
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
@ -23,7 +23,7 @@ index db2b49bb..bf77ab9a 100644
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..f09af5e6 100644
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'
@ -31,13 +31,22 @@ index ac73b5d6..f09af5e6 100644
grid_label_inline_usa_image = 'gridliner_labels_inline_usa'
+# Force higher tolerance due to new FreeType on Fedora.
+grid_label_tol = 15
+grid_label_inline_tol = 10.2
+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