예제 #1
0
 def test_assign_values_exposure(self):
     """test _assign_values_exposure within make_osmexposure function"""
     # Define and load parameters:
     building_gdf = OSM._get_midpoints(os.path.join(DATA_DIR, 'buildings_47_8.shp')) # function tested previously
     mode = 'LitPop'     # mode LitPop takes too long for unit test, moved to integration test
     country = 'CHE'
     # Execute function
     High_Value_Area_gdf = OSM._assign_values_exposure(building_gdf, mode, country)
     self.assertGreater(High_Value_Area_gdf.loc[random.randint(0,len(High_Value_Area_gdf))].value,0)
예제 #2
0
 def test_assign_values_exposure(self):
     """test _assign_values_exposure within make_osmexposure function"""
     # Define and load parameters:
     # function tested previously
     building_gdf = OSM._get_midpoints(
         DATA_DIR.joinpath('buildings_47_8.shp'))
     # mode LitPop takes too long for unit test, since loads entire CH-litpop exposure!
     # moved to integration test
     mode = 'default'
     country = 'CHE'
     # Execute Function
     High_Value_Area_gdf = OSM._assign_values_exposure(
         building_gdf, mode, country)
     self.assertGreater(
         High_Value_Area_gdf.loc[random.randint(
             0, len(High_Value_Area_gdf))].value, 0)