Skip to content

Commit 3fbcbd9

Browse files
committed
Rework the parametrized tests of test_add_nodes_with_mask
- Remove the constant masks, because we have sufficient coverage with the variable masks - Add a test case with a variable boolean mask
1 parent e33bcc2 commit 3fbcbd9

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/addon/esmpy/src/esmpy/test/test_api/test_mesh.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,16 @@
2828
"mask_value",
2929
(
3030
None,
31-
0,
32-
True,
33-
1,
34-
False,
3531
[[0, 0, 0, 0], [-1, -1, -1, -1], [1, 1, 1, 1]],
32+
[[False, False, False, False], [True, False, True, False], [True, True, True, True]],
3633
),
3734
)
3835
def test_add_nodes_with_mask(mask_value):
3936
"""Check adding masked nodes to a mesh."""
4037
if mask_value is None:
4138
mask = None
4239
else:
43-
mask = np.broadcast_to(mask_value, (3, 4))
40+
mask = np.array(mask_value)
4441
mesh = Mesh(parametric_dim=2, spatial_dim=2, coord_sys=CoordSys.CART)
4542

4643
x_of_points, y_of_points = np.meshgrid([0.0, 1.0, 2.0, 3.0], [0.0, 1.0, 2.0])

0 commit comments

Comments
 (0)