Skip to content

Commit

Permalink
Add 5x5 grid column_track() unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
acroucher committed Apr 4, 2024
1 parent a887ea5 commit a9e32e4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_mulgrid.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,15 @@ def test_column_track(self):
self.assertEqual(names, expected_names)
self.assertTrue(np.allclose(t[-1][2], line[1]))

# 5x5 grid:
geo = mulgrid().rectangular([100]*5, [100]*5, [10])
line = [np.array([100, 100]), np.array([400, 400])]
t = geo.column_track(line)
self.assertEqual(len(t), 3)
if (len(t) == 3):
self.assertTrue(np.allclose(t[0][1], line[0]))
self.assertTrue(np.allclose(t[-1][2], line[1]))

def test_grid3d(self):
"""3D grid"""

Expand Down

0 comments on commit a9e32e4

Please sign in to comment.