forked from s_ranjbar/city_retrofit
Partial correction for unit tests
This commit is contained in:
parent
634bbc286f
commit
c480a6c4cb
|
@ -10,8 +10,6 @@ from imports.geometry_factory import GeometryFactory
|
|||
|
||||
|
||||
class MyTestCase(TestCase):
|
||||
def test_something(self):
|
||||
self.assertEqual(True, False)
|
||||
"""
|
||||
TestImports
|
||||
"""
|
||||
|
|
|
@ -33,7 +33,7 @@ class TestPhysicsFactory(TestCase):
|
|||
if self._nyc_with_physics is None:
|
||||
file_path = (self._example_path / '20buildings.gml').resolve()
|
||||
self._nyc_with_physics = self._get_citygml(file_path)
|
||||
PhysicsFactory('us_new_york', self._nyc_with_physics)
|
||||
PhysicsFactory('us_new_york', self._nyc_with_physics).enrich()
|
||||
return self._nyc_with_physics
|
||||
|
||||
def test_city_with_physics_extended_library(self):
|
||||
|
@ -60,7 +60,7 @@ class TestPhysicsFactory(TestCase):
|
|||
def test_reduced_library(self):
|
||||
file_path = (self._example_path / 'lod2_buildings.gml').resolve()
|
||||
city = self._get_citygml(file_path)
|
||||
PhysicsFactory('ca', city)
|
||||
PhysicsFactory('ca', city).enrich()
|
||||
for building in city.buildings:
|
||||
self.assertIsNotNone(building.average_storey_height, 'average_storey_height is none')
|
||||
self.assertIsNotNone(building.storeys_above_ground, 'storeys_above_ground is none')
|
||||
|
|
|
@ -33,7 +33,7 @@ class TestWeatherFactory(TestCase):
|
|||
if self._city_with_weather is None:
|
||||
file_path = (Path(__file__).parent / 'tests_data' / '20buildings.gml').resolve()
|
||||
self._city_with_weather = self._get_citygml(file_path)
|
||||
WeatherFactory('dat', self._city_with_weather, city_name=self._city_name, base_path=self._example_path)
|
||||
WeatherFactory('dat', self._city_with_weather, city_name=self._city_name, base_path=self._example_path).enrich()
|
||||
return self._city_with_weather
|
||||
|
||||
def test_city_with_weather(self):
|
||||
|
@ -55,7 +55,7 @@ class TestWeatherFactory(TestCase):
|
|||
def test_weather_xls(self):
|
||||
file_path = (Path(__file__).parent / 'tests_data' / 'iso_52016_1_2017_lod2.gml').resolve()
|
||||
city_with_weather = self._get_citygml(file_path)
|
||||
WeatherFactory('xls', city_with_weather, city_name=self._city_name, base_path=self._example_path)
|
||||
WeatherFactory('xls', city_with_weather, city_name=self._city_name, base_path=self._example_path).enrich()
|
||||
for building in city_with_weather.buildings:
|
||||
values = building.external_temperature['hour'][['iso52016']]
|
||||
self.assertFalse(values.empty, 'wrong value external_temperature')
|
||||
|
|
Loading…
Reference in New Issue
Block a user