Skip to content

Commit

Permalink
Fixed test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronzedwick committed Jan 16, 2025
1 parent a14286a commit 60964fe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/test_grid.py
Original file line number Diff line number Diff line change
Expand Up @@ -774,17 +774,17 @@ def test_number_of_faces_found():
# For a face center only one face should be found
point_xyz = np.array([grid.face_x[100].values, grid.face_y[100].values, grid.face_z[100].values])

assert len(grid.get_faces_containing_point(point_xyz=point_xyz)) == 1
assert len(grid.get_faces_containing_point(point=point_xyz)) == 1

# For an edge two faces should be found
point_xyz = np.array([grid.edge_x[100].values, grid.edge_y[100].values, grid.edge_z[100].values])

assert len(grid.get_faces_containing_point(point_xyz=point_xyz)) == 2
assert len(grid.get_faces_containing_point(point=point_xyz)) == 2

# For a node three faces should be found
point_xyz = np.array([grid.node_x[100].values, grid.node_y[100].values, grid.node_z[100].values])

assert len(grid.get_faces_containing_point(point_xyz=point_xyz)) == 3
assert len(grid.get_faces_containing_point(point=point_xyz)) == 3


def test_whole_grid():
Expand All @@ -797,7 +797,7 @@ def test_whole_grid():
for i in range(len(grid.face_x.values)):
point_xyz = np.array([grid.face_x[i].values, grid.face_y[i].values, grid.face_z[i].values])

assert len(grid.get_faces_containing_point(point_xyz=point_xyz)) == 1
assert len(grid.get_faces_containing_point(point=point_xyz)) == 1

def test_point_types():
"""Tests that `self.get_faces_containing_point` works with cartesian and lonlat"""
Expand Down

0 comments on commit 60964fe

Please sign in to comment.