@@ -169,39 +169,41 @@ def test_get_countries_per_region(self):
169169 self .assertListEqual (out [3 ], ["CAN" , "USA" ])
170170
171171 def test_get_region_per_countries (self ):
172- """Test static get_regions_per_countries ()"""
172+ """Test get_impf_id_regions_per_countries ()"""
173173 ifs = ImpfSetTropCyclone ()
174- out = ifs .get_regions_per_countries (countries = ["CHE" ], code_type = "ISO3A" )
174+ out = ifs .get_impf_id_regions_per_countries (
175+ countries = ["CHE" ], code_type = "ISO3A"
176+ )
175177 self .assertEqual (out [0 ][0 ], 10 )
176178 self .assertEqual (out [1 ][0 ], "ROW" )
177179 self .assertEqual (out [2 ][0 ], "Rest of The World" )
178- out = ifs .get_regions_per_countries (countries = [756 ], code_type = "ISO3N" )
180+ out = ifs .get_impf_id_regions_per_countries (countries = [756 ], code_type = "ISO3N" )
179181 self .assertEqual (out [0 ][0 ], 10 )
180182 self .assertEqual (out [1 ][0 ], "ROW" )
181183 self .assertEqual (out [2 ][0 ], "Rest of The World" )
182184 with self .assertRaises (ValueError ) as context :
183- ImpfSetTropCyclone .get_regions_per_countries (
185+ ImpfSetTropCyclone .get_impf_id_regions_per_countries (
184186 countries = ["SWE" ], code_type = "invalid_code"
185187 )
186188 self .assertEqual (
187189 str (context .exception ), "code_type must be either 'iso3a' or 'iso3n'"
188190 )
189191 with self .assertRaises (ValueError ) as context :
190- ImpfSetTropCyclone .get_regions_per_countries (
192+ ImpfSetTropCyclone .get_impf_id_regions_per_countries (
191193 countries = ["SWE" , 840 ], code_type = "ISO3A"
192194 )
193195 self .assertEqual (
194196 str (context .exception ), "All elements in the list must be of the same type."
195197 )
196198 with self .assertRaises (ValueError ) as context :
197- ImpfSetTropCyclone .get_regions_per_countries (
199+ ImpfSetTropCyclone .get_impf_id_regions_per_countries (
198200 countries = [840 , 124 ], code_type = "ISO3A"
199201 )
200202 self .assertEqual (
201203 str (context .exception ), "ISO3A code type cannot have integer values."
202204 )
203205 with self .assertRaises (ValueError ) as context :
204- ImpfSetTropCyclone .get_regions_per_countries (
206+ ImpfSetTropCyclone .get_impf_id_regions_per_countries (
205207 countries = ["MEX" ], code_type = "ISO3N"
206208 )
207209 self .assertEqual (
0 commit comments