Blob Blame History Raw
From 49e10df68f0c59f81aa5ec07ead5941db349da6d Mon Sep 17 00:00:00 2001
From: Elliott Sales de Andrade <quantum.analyst@gmail.com>
Date: Tue, 27 Feb 2018 02:14:00 -0500
Subject: [PATCH 6/7] Increase some tolerances for 32-bit systems.

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

diff --git a/lib/cartopy/tests/crs/test_lambert_azimuthal_equal_area.py b/lib/cartopy/tests/crs/test_lambert_azimuthal_equal_area.py
index b6fb853..ca7e235 100644
--- a/lib/cartopy/tests/crs/test_lambert_azimuthal_equal_area.py
+++ b/lib/cartopy/tests/crs/test_lambert_azimuthal_equal_area.py
@@ -35,7 +35,7 @@ class TestLambertAzimuthalEqualArea(object):
                             decimal=4)
         assert_almost_equal(np.array(crs.y_limits),
                             [-12727770.598700099, 12727770.598700099],
-                            decimal=4)
+                            decimal=1)
 
     def test_eccentric_globe(self):
         globe = ccrs.Globe(semimajor_axis=1000, semiminor_axis=500,
diff --git a/lib/cartopy/tests/mpl/test_examples.py b/lib/cartopy/tests/mpl/test_examples.py
index db689e0..69d4f5a 100644
--- a/lib/cartopy/tests/mpl/test_examples.py
+++ b/lib/cartopy/tests/mpl/test_examples.py
@@ -43,7 +43,7 @@ class ExampleImageTesting(ImageTesting):
 
 @pytest.mark.natural_earth
 @ExampleImageTesting(['global_map'],
-                     tolerance=4 if MPL_VERSION < '2' else 0)
+                     tolerance=4 if MPL_VERSION < '2' else 0.05)
 def test_global_map():
     import cartopy.examples.global_map as c
     c.main()
diff --git a/lib/cartopy/tests/mpl/test_features.py b/lib/cartopy/tests/mpl/test_features.py
index 250e3db..f36c344 100644
--- a/lib/cartopy/tests/mpl/test_features.py
+++ b/lib/cartopy/tests/mpl/test_features.py
@@ -54,7 +54,7 @@ def test_natural_earth_custom():
 
 
 @ImageTesting(['gshhs_coastlines'],
-              tolerance=1.7 if MPL_VERSION < '2' else 0)
+              tolerance=1.7 if MPL_VERSION < '2' else 0.07)
 def test_gshhs():
     ax = plt.axes(projection=ccrs.Mollweide())
     ax.set_extent([138, 142, 32, 42], ccrs.Geodetic())
diff --git a/lib/cartopy/tests/mpl/test_images.py b/lib/cartopy/tests/mpl/test_images.py
index 105ee80..119ba7c 100644
--- a/lib/cartopy/tests/mpl/test_images.py
+++ b/lib/cartopy/tests/mpl/test_images.py
@@ -155,7 +155,7 @@ def test_pil_Image():
 
 
 @ImageTesting(['imshow_natural_earth_ortho'],
-              tolerance=4.2 if MPL_VERSION < '2' else 0)
+              tolerance=4.2 if MPL_VERSION < '2' else 0.05)
 def test_background_img():
     ax = plt.axes(projection=ccrs.Orthographic())
     ax.background_img(name='ne_shaded', resolution='low')
diff --git a/lib/cartopy/tests/mpl/test_img_transform.py b/lib/cartopy/tests/mpl/test_img_transform.py
index 3b53c0a..dfea25a 100644
--- a/lib/cartopy/tests/mpl/test_img_transform.py
+++ b/lib/cartopy/tests/mpl/test_img_transform.py
@@ -98,7 +98,7 @@ elif '2.0.1' <= MPL_VERSION:
     # Bug in latest Matplotlib that we don't consider correct.
     regrid_tolerance = 4.75
 else:
-    regrid_tolerance = 0
+    regrid_tolerance = 0.03
 
 
 @pytest.mark.natural_earth
-- 
2.14.3