Commit a3d73906 authored by Bas Couwenberg's avatar Bas Couwenberg

Update patch to use xfail for tests failing on i386.

parent 6191f296
python-cartopy (0.17.0+dfsg-2) UNRELEASED; urgency=medium
* Update patch to use xfail for tests failing on i386.
-- Bas Couwenberg <sebastic@debian.org> Sun, 18 Nov 2018 14:04:13 +0100
python-cartopy (0.17.0+dfsg-1) unstable; urgency=medium
* Team upload.
......
......@@ -4,28 +4,58 @@ Subject: Skip tests failing on i386 architectures
--- a/lib/cartopy/tests/crs/test_lambert_azimuthal_equal_area.py
+++ b/lib/cartopy/tests/crs/test_lambert_azimuthal_equal_area.py
@@ -23,6 +23,10 @@ import pytest
@@ -20,6 +20,7 @@ from __future__ import (absolute_import,
import numpy as np
from numpy.testing import assert_almost_equal
import pytest
+import sysconfig
import cartopy.crs as ccrs
+# See: https://wiki.debian.org/Python/MultiArch
@@ -31,6 +32,8 @@ def check_proj4_params(crs, other_args):
class TestLambertAzimuthalEqualArea(object):
+ @pytest.mark.xfail('i386' in sysconfig.get_config_var('MULTIARCH'),
+ reason='Limitations of i386 architecture')
def test_default(self):
crs = ccrs.LambertAzimuthalEqualArea()
other_args = {'ellps=WGS84', 'lon_0=0.0', 'lat_0=0.0', 'x_0=0.0',
--- a/lib/cartopy/tests/mpl/test_features.py
+++ b/lib/cartopy/tests/mpl/test_features.py
@@ -19,6 +19,7 @@ from __future__ import (absolute_import,
import matplotlib.pyplot as plt
import pytest
+import sysconfig
+triplet = sysconfig.get_config_var('MULTIARCH')
+arch_is_i386 = 'i386' in triplet
def check_proj4_params(crs, other_args):
expected = other_args | {'proj=laea', 'no_defs'}
@@ -40,9 +44,10 @@ class TestLambertAzimuthalEqualArea(obje
assert_almost_equal(np.array(crs.x_limits),
[-12755636.1863, 12755636.1863],
decimal=4)
- assert_almost_equal(np.array(crs.y_limits),
- [-12727770.598700099, 12727770.598700099],
- decimal=4)
+ if not arch_is_i386:
+ assert_almost_equal(np.array(crs.y_limits),
+ [-12727770.598700099, 12727770.598700099],
+ decimal=4)
def test_eccentric_globe(self):
globe = ccrs.Globe(semimajor_axis=1000, semiminor_axis=500,
import cartopy.crs as ccrs
import cartopy.feature as cfeature
@@ -53,6 +54,8 @@ def test_natural_earth_custom():
ax.set_ylim((58, 72))
+@pytest.mark.xfail('i386' in sysconfig.get_config_var('MULTIARCH'),
+ reason='Limitations of i386 architecture')
@ImageTesting(['gshhs_coastlines'],
tolerance=1.7 if MPL_VERSION < '2' else 0)
def test_gshhs():
--- a/lib/cartopy/tests/mpl/test_images.py
+++ b/lib/cartopy/tests/mpl/test_images.py
@@ -18,6 +18,7 @@
from __future__ import (absolute_import, division, print_function)
import os
+import sysconfig
import types
import numpy as np
@@ -169,6 +170,8 @@ def test_pil_Image():
extent=[-180, 180, -90, 90])
+@pytest.mark.xfail('i386' in sysconfig.get_config_var('MULTIARCH'),
+ reason='Limitations of i386 architecture')
@pytest.mark.xfail((5, 0, 0) <= ccrs.PROJ4_VERSION < (5, 1, 0),
reason='Proj Orthographic projection is buggy.',
strict=True)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment