1
- from packaging .version import Version
2
-
3
1
import numpy as np
4
2
import pytest
3
+ from packaging .version import Version
5
4
6
- from ..conftest import BMI_VERSION , skip_if_grid_type_is_not
5
+ from ..conftest import BMI_VERSION
6
+ from ..conftest import skip_if_grid_type_is_not
7
7
8
8
VALID_GRID_TYPES = (
9
9
"none" ,
20
20
21
21
# @pytest.mark.dependency()
22
22
def test_get_grid_rank (initialized_bmi , gid ):
23
- "Test grid rank for grid {gid}" . format ( gid = gid )
23
+ "Test grid rank for grid"
24
24
rank = initialized_bmi .get_grid_rank (gid )
25
25
assert isinstance (rank , int )
26
26
assert rank <= 3
@@ -29,15 +29,15 @@ def test_get_grid_rank(initialized_bmi, gid):
29
29
30
30
31
31
def test_get_grid_size (initialized_bmi , gid ):
32
- "Test grid size for grid {gid}" . format ( gid = gid )
32
+ "Test grid size for grid"
33
33
size = initialized_bmi .get_grid_size (gid )
34
34
assert isinstance (size , int )
35
35
assert size > 0
36
36
37
37
38
38
# @pytest.mark.dependency()
39
39
def test_get_grid_type (initialized_bmi , gid ):
40
- "Test grid is known for grid {gid}" . format ( gid = gid )
40
+ "Test grid is known for grid"
41
41
gtype = initialized_bmi .get_grid_type (gid )
42
42
assert isinstance (gtype , str )
43
43
assert gtype in VALID_GRID_TYPES
@@ -48,7 +48,7 @@ def test_get_grid_type(initialized_bmi, gid):
48
48
)
49
49
# @pytest.mark.dependency()
50
50
def test_get_grid_node_count (initialized_bmi , gid ):
51
- "Test number of nodes in grid {gid}" . format ( gid = gid )
51
+ "Test number of nodes in grid"
52
52
skip_if_grid_type_is_not (initialized_bmi , gid , "unstructured" )
53
53
54
54
n_nodes = initialized_bmi .get_grid_node_count (gid )
@@ -58,7 +58,7 @@ def test_get_grid_node_count(initialized_bmi, gid):
58
58
59
59
# @pytest.mark.dependency()
60
60
def test_get_grid_edge_count (initialized_bmi , gid ):
61
- "Test number of edges in grid {gid}" . format ( gid = gid )
61
+ "Test number of edges in grid"
62
62
skip_if_grid_type_is_not (initialized_bmi , gid , "unstructured" )
63
63
64
64
n_edges = initialized_bmi .get_grid_edge_count (gid )
@@ -70,7 +70,7 @@ def test_get_grid_edge_count(initialized_bmi, gid):
70
70
71
71
# @pytest.mark.dependency()
72
72
def test_get_grid_face_count (initialized_bmi , gid ):
73
- "Test number of faces in grid {gid}" . format ( gid = gid )
73
+ "Test number of faces in grid"
74
74
skip_if_grid_type_is_not (initialized_bmi , gid , "unstructured" )
75
75
76
76
n_faces = initialized_bmi .get_grid_face_count (gid )
@@ -80,7 +80,7 @@ def test_get_grid_face_count(initialized_bmi, gid):
80
80
81
81
# @pytest.mark.dependency(depends=["test_get_grid_node_count", "test_get_grid_edge_count"])
82
82
def test_get_grid_edge_nodes (initialized_bmi , gid ):
83
- "Test nodes at edges for grid {gid}" . format ( gid = gid )
83
+ "Test nodes at edges for grid"
84
84
skip_if_grid_type_is_not (initialized_bmi , gid , "unstructured" )
85
85
86
86
n_edges = initialized_bmi .get_grid_edge_count (gid )
@@ -100,7 +100,7 @@ def test_get_grid_edge_nodes(initialized_bmi, gid):
100
100
@pytest .mark .skip ("edges_per_face" )
101
101
# @pytest.mark.dependency(depends=["test_get_grid_node_count", "test_get_grid_edge_count", "test_get_grid_face_count"])
102
102
def test_get_grid_edges_per_face (initialized_bmi , gid ):
103
- "Test number of edges at each face for grid {gid}" . format ( gid = gid )
103
+ "Test number of edges at each face for grid"
104
104
skip_if_grid_type_is_not (initialized_bmi , gid , "unstructured" )
105
105
106
106
n_edges = initialized_bmi .get_grid_edge_count (gid )
@@ -127,7 +127,7 @@ def test_get_grid_edges_per_face(initialized_bmi, gid):
127
127
]
128
128
)
129
129
def test_get_grid_face_edges (initialized_bmi , gid ):
130
- "Test edges at face for grid {gid}" . format ( gid = gid )
130
+ "Test edges at face for grid"
131
131
skip_if_grid_type_is_not (initialized_bmi , gid , "unstructured" )
132
132
133
133
n_faces = initialized_bmi .get_grid_face_count (gid )
0 commit comments