File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,9 @@ def test_netherlands150_pass(self):
5353 self .assertEqual (ent .gdf .shape [0 ], 2829 )
5454
5555 def test_BLM150_pass (self ):
56- """Test from_countries for BLM at 150 arcsec, 2 data points"""
56+ """Test from_countries for BLM at 150 arcsec, 2 data points
57+ The world bank doesn't provide data for Saint Barthélemy, fall back to natearth
58+ """
5759 ent = lp .LitPop .from_countries ("BLM" , res_arcsec = 150 , reference_year = 2016 )
5860 self .assertEqual (ent .gdf .shape [0 ], 2 )
5961
Original file line number Diff line number Diff line change @@ -216,7 +216,7 @@ def download_world_bank_indicator(
216216 # Check if we received an error message
217217 try :
218218 if json_data [0 ]["message" ][0 ]["id" ] == "120" :
219- raise RuntimeError (
219+ raise ValueError (
220220 "Error requesting data from the World Bank API. Did you use the "
221221 "correct country code and indicator ID?"
222222 )
Original file line number Diff line number Diff line change @@ -151,12 +151,12 @@ def test_download_wb_data(self):
151151
152152 # Check errors raised
153153 with self .assertRaisesRegex (
154- RuntimeError ,
154+ ValueError ,
155155 "Did you use the correct country code" ,
156156 ):
157157 download_world_bank_indicator ("Spain" , "NY.GDP.MKTP.CD" )
158158 with self .assertRaisesRegex (
159- RuntimeError ,
159+ ValueError ,
160160 "Did you use the correct country code" ,
161161 ):
162162 download_world_bank_indicator ("ESP" , "BogusIndicator" )
You can’t perform that action at this time.
0 commit comments