Change export method from property to function to improve the semantic

This commit is contained in:
Guille Gutierrez 2021-04-07 11:52:39 -04:00
parent 7a77c47d04
commit 634bbc286f
2 changed files with 2 additions and 3 deletions

View File

@ -58,11 +58,10 @@ class ExportsFactory:
""" """
raise NotImplementedError() raise NotImplementedError()
@property
def export(self): def export(self):
""" """
Export the city model structure to the given export type Export the city model structure to the given export type
:return: City :return: None
""" """
return getattr(self, self._export_type, lambda: None) return getattr(self, self._export_type, lambda: None)

View File

@ -44,7 +44,7 @@ class TestExports(TestCase):
def _export(self, export_type): def _export(self, export_type):
self._city_gml = self._get_city() self._city_gml = self._get_city()
ExportsFactory(export_type, self._city_gml, self._output_path).export ExportsFactory(export_type, self._city_gml, self._output_path).export()
def test_obj_export(self): def test_obj_export(self):
self._export('obj') self._export('obj')