Skip to content

Commit 4bf2baf

Browse files
test_osm: randint has an inclusive upper boundary (unlike range)
1 parent 679ab95 commit 4bf2baf

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

climada/test/test_osm.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ def test_get_osmstencil_litpop(self):
6161
self.assertIsInstance(exposure_high_47_8, Exposures)
6262
self.assertEqual(len(exposure_high_47_8.gdf.columns), 8)
6363
self.assertGreater(
64-
exposure_high_47_8.gdf.iloc[random.randint(0, len(exposure_high_47_8.gdf))].value,
64+
exposure_high_47_8.gdf.iloc[
65+
random.randint(0, len(exposure_high_47_8.gdf) - 1)
66+
].value,
6567
0)
6668

6769
def test_make_osmexposure(self):

0 commit comments

Comments
 (0)