Skip to content

Commit 3329b83

Browse files
committed
skip tests under certain conditions
Skips tests in TestProjectCoords only when using Python 3.x and pyproj 1.9.4 or below. The patches for these problems are in the current development version of pyproj.
1 parent 9de9ac8 commit 3329b83

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/mpl_toolkits/basemap/test.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1+
import sys
12
from mpl_toolkits.basemap import Basemap, shiftgrid
23
import numpy as np
34

45
# beginnings of a test suite.
56

6-
from numpy.testing import TestCase,assert_almost_equal
7+
from numpy.testing import TestCase, assert_almost_equal, dec
8+
9+
# For Python 3.x this will be true
10+
PY3 = (sys.version_info[0] == 3)
711

812
class TestRotateVector(TestCase):
913

@@ -148,7 +152,8 @@ def test_less_than_n_by_3_points_should_work(self):
148152
lonsout = bm.shiftdata(lonsin[:, :2])
149153
assert_almost_equal(lonsout_expected, lonsout)
150154

151-
155+
@dec.skipif( PY3 and pyproj.__version__ <= "1.9.4",
156+
"TestProjectCoords tests skipped in Python 3.x with pyproj version 1.9.4 and below." )
152157
class TestProjectCoords(TestCase):
153158
def get_data(self):
154159
lons, lats = np.arange(-180, 180, 20), np.arange(-90, 90, 10)

0 commit comments

Comments
 (0)