Skip to content

Commit c8ece69

Browse files
committed
skip old pytest
1 parent 75a34a8 commit c8ece69

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

tests/test_main.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,13 @@
1010
import numpy as np
1111
import pymap3d as pm
1212
from pymap3d.timeconv import str2dt
13+
from packaging import version
1314

1415
pi = np.pi
1516
nan = np.nan
1617

18+
OLD = version.parse(pytest.__version__) < version.parse('3.5')
19+
1720
lla0 = (42, -82, 200)
1821
rlla0 = (np.radians(lla0[0]), np.radians(lla0[1]), lla0[2])
1922

@@ -57,6 +60,7 @@ def test_str2dt():
5760
# %%
5861

5962

63+
@pytest.mark.skipif(OLD, reason='too old pytest')
6064
def test_losint():
6165

6266
az = [0., 10., 125.]

tests/test_pyproj_compare.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
from pymap3d.vincenty import vreckon, vdist
55
import pymap3d as pm
66
import numpy as np
7+
from packaging import version
8+
9+
OLD = version.parse(pytest.__version__) < version.parse('3.5')
710

811
az = [38., 45.]
912
sr = [3e3, 1e3]
@@ -23,6 +26,7 @@
2326
az3 = (218.00292856, 225.0011203)
2427

2528

29+
@pytest.mark.skipif(OLD, reason='too old pytest')
2630
def test_vreckon():
2731
""" tests scalars, vectors"""
2832

@@ -40,6 +44,7 @@ def test_vreckon():
4044
assert c == approx(az3)
4145

4246

47+
@pytest.mark.skipif(OLD, reason='too old pytest')
4348
def test_vdist():
4449
lat1, lon1, a21 = vreckon(*ll0, sr[0], az[0])
4550

0 commit comments

Comments
 (0)