Skip to content

Commit a7da29d

Browse files
committed
add version test
1 parent 9901963 commit a7da29d

File tree

3 files changed

+34
-22
lines changed

3 files changed

+34
-22
lines changed

tests/test_import.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ def test_earthkit_geo_import():
2020
from earthkit.geo import nearest_point_kdtree # noqa
2121

2222

23+
def test_earthkit_transforms_import():
24+
import earthkit.transforms # noqa
25+
from earthkit.transforms import aggregate # noqa
26+
27+
28+
def test_earthkit_hydro_import():
29+
import earthkit.hydro # noqa
30+
from earthkit.hydro import river_network # noqa
31+
32+
2333
def test_earthkit_meteo_import():
2434
import earthkit.meteo # noqa
2535
from earthkit.meteo import thermo # noqa
@@ -38,13 +48,3 @@ def test_earthkit_regrid_import():
3848
def test_earthkit_time_import():
3949
import earthkit.time # noqa
4050
from earthkit.time import DailySequence # noqa
41-
42-
43-
def test_earthkit_transforms_import():
44-
import earthkit.transforms # noqa
45-
from earthkit.transforms import aggregate # noqa
46-
47-
48-
def test_earthkit_hydro_import():
49-
import earthkit.hydro # noqa
50-
from earthkit.hydro import river_network # noqa

tests/test_obj.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,18 @@ def test_earthkit_geo_obj_2():
3434
assert callable(geo.nearest_point_kdtree)
3535

3636

37+
def test_earthkit_hydro_obj_1():
38+
import earthkit.hydro
39+
40+
assert callable(earthkit.hydro.river_network.load)
41+
42+
43+
def test_earthkit_hydro_obj_2():
44+
from earthkit import hydro
45+
46+
assert callable(hydro.river_network.load)
47+
48+
3749
def test_earthkit_meteo_obj_1():
3850
import earthkit.meteo
3951

@@ -94,15 +106,3 @@ def test_earthkit_transforms_obj_2():
94106
from earthkit import transforms
95107

96108
assert callable(transforms.aggregate.spatial.masks)
97-
98-
99-
def test_earthkit_hydro_obj_1():
100-
import earthkit.hydro
101-
102-
assert callable(earthkit.hydro.river_network.load)
103-
104-
105-
def test_earthkit_hydro_obj_2():
106-
from earthkit import hydro
107-
108-
assert callable(hydro.river_network.load)

tests/test_version.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,18 @@ def test_earthkit_geo_version_2():
4848
assert VERSION_RX.match(geo.__version__) is not None
4949

5050

51+
def test_earthkit_hydro_version_1():
52+
import earthkit.hydro # noqa
53+
54+
assert VERSION_RX.match(earthkit.hydro.__version__) is not None
55+
56+
57+
def test_earthkit_hydro_version_2():
58+
from earthkit import hydro # noqa
59+
60+
assert VERSION_RX.match(hydro.__version__) is not None
61+
62+
5163
def test_earthkit_meteo_version_1():
5264
import earthkit.meteo # noqa
5365

0 commit comments

Comments
 (0)