From 501a470248e30043018ba2a0b7c5154ed854cf06 Mon Sep 17 00:00:00 2001 From: Vecko <36369090+VeckoTheGecko@users.noreply.github.com> Date: Tue, 13 Jan 2026 15:28:24 +0100 Subject: [PATCH] Update hypothesis SGRID strategy There was a small bug in the Hypothesis strategies for SGRID that interfered with some other tooling. --- tests/strategies/sgrid.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/tests/strategies/sgrid.py b/tests/strategies/sgrid.py index 562b242e18..ccfc100a02 100644 --- a/tests/strategies/sgrid.py +++ b/tests/strategies/sgrid.py @@ -29,7 +29,11 @@ @st.composite def grid2Dmetadata(draw) -> sgrid.Grid2DMetadata: N = 8 - names = draw(st.lists(dimension_name, min_size=N, max_size=N, unique=True)) + names = draw( + st.lists(dimension_name, min_size=N, max_size=N, unique=True) + # Reserved, as 'grid' name is used in Parcels testing to store grid information + .filter(lambda names: "grid" not in names) + ) node_dimension1 = names[0] node_dimension2 = names[1] face_dimension1 = names[2] @@ -74,7 +78,11 @@ def grid2Dmetadata(draw) -> sgrid.Grid2DMetadata: @st.composite def grid3Dmetadata(draw) -> sgrid.Grid3DMetadata: N = 9 - names = draw(st.lists(dimension_name, min_size=N, max_size=N, unique=True)) + names = draw( + st.lists(dimension_name, min_size=N, max_size=N, unique=True) + # Reserved, as 'grid' name is used in Parcels testing to store grid information + .filter(lambda names: "grid" not in names) + ) node_dimension1 = names[0] node_dimension2 = names[1] node_dimension3 = names[2]