Skip to content

Commit 1490603

Browse files
adjust test string and fix whitespace
1 parent 90b55b8 commit 1490603

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

climada/entity/exposures/base.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def latitude(self):
144144
raise ValueError(
145145
"Can only calculate latitude from Points."
146146
f" GeoDataFrame contains {', '.join(nonpoints)}."
147-
"Please see the lines_polygons module tutorial."
147+
" Please see the lines_polygons module tutorial."
148148
) from valerr
149149
raise
150150

@@ -162,8 +162,8 @@ def longitude(self):
162162
if nonpoints:
163163
raise ValueError(
164164
"Can only calculate longitude from Points."
165-
f" GeoDataFrame contains {', '.join(nonpoints)}"
166-
"Please see the lines_polygons module tutorial."
165+
f" GeoDataFrame contains {', '.join(nonpoints)}."
166+
" Please see the lines_polygons module tutorial."
167167
) from valerr
168168
raise
169169

climada/entity/exposures/test/test_base.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -671,13 +671,17 @@ def test_latlon_with_polygons(self):
671671
with self.assertRaises(ValueError) as valer:
672672
exp.latitude
673673
self.assertEqual(
674-
"Can only calculate latitude from Points. GeoDataFrame contains Polygon, MultiPolygon",
674+
"Can only calculate latitude from Points."
675+
" GeoDataFrame contains Polygon, MultiPolygon."
676+
" Please see the lines_polygons module tutorial.",
675677
str(valer.exception),
676678
)
677679
with self.assertRaises(ValueError) as valer:
678680
exp.longitude
679681
self.assertEqual(
680-
"Can only calculate longitude from Points. GeoDataFrame contains Polygon, MultiPolygon",
682+
"Can only calculate longitude from Points."
683+
" GeoDataFrame contains Polygon, MultiPolygon."
684+
" Please see the lines_polygons module tutorial.",
681685
str(valer.exception),
682686
)
683687

0 commit comments

Comments
 (0)