Skip to content

Commit

Permalink
use numpy for testing
Browse files Browse the repository at this point in the history
Co-authored-by: Lukas Riedel <[email protected]>
  • Loading branch information
NicolasColombi and peanutfun authored Dec 20, 2024
1 parent 68b006e commit b0003f3
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions climada/hazard/centroids/test/test_centr.py
Original file line number Diff line number Diff line change
Expand Up @@ -827,14 +827,8 @@ def test_append_multiple_arguments(self):

centr.append(*centroids_list)

self.assertEqual(centr.lat[0], 1)
self.assertEqual(centr.lat[1], 2)
self.assertEqual(centr.lat[2], 3)
self.assertEqual(centr.lat[3], 4)
self.assertEqual(centr.lon[0], 1)
self.assertEqual(centr.lon[1], 2)
self.assertEqual(centr.lon[2], 3)
self.assertEqual(centr.lon[3], 4)
np.testing.assert_array_equal(centr.lat, [1, 2, 3, 4])
np.testing.assert_array_equal(centr.lon, [1, 2, 3, 4])

def test_remove_duplicate_pass(self):
"""Test remove_duplicate_points"""
Expand Down

0 comments on commit b0003f3

Please sign in to comment.