Skip to content

Commit 6f15937

Browse files
Update hypothesis SGRID strategy (#2467)
1 parent ab2cba3 commit 6f15937

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tests/strategies/sgrid.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,11 @@
2929
@st.composite
3030
def grid2Dmetadata(draw) -> sgrid.Grid2DMetadata:
3131
N = 8
32-
names = draw(st.lists(dimension_name, min_size=N, max_size=N, unique=True))
32+
names = draw(
33+
st.lists(dimension_name, min_size=N, max_size=N, unique=True)
34+
# Reserved, as 'grid' name is used in Parcels testing to store grid information
35+
.filter(lambda names: "grid" not in names)
36+
)
3337
node_dimension1 = names[0]
3438
node_dimension2 = names[1]
3539
face_dimension1 = names[2]
@@ -74,7 +78,11 @@ def grid2Dmetadata(draw) -> sgrid.Grid2DMetadata:
7478
@st.composite
7579
def grid3Dmetadata(draw) -> sgrid.Grid3DMetadata:
7680
N = 9
77-
names = draw(st.lists(dimension_name, min_size=N, max_size=N, unique=True))
81+
names = draw(
82+
st.lists(dimension_name, min_size=N, max_size=N, unique=True)
83+
# Reserved, as 'grid' name is used in Parcels testing to store grid information
84+
.filter(lambda names: "grid" not in names)
85+
)
7886
node_dimension1 = names[0]
7987
node_dimension2 = names[1]
8088
node_dimension3 = names[2]

0 commit comments

Comments
 (0)