Partially correct unit-test
This commit is contained in:
parent
066a25bfee
commit
35e50cf551
@ -4,6 +4,8 @@ SPDX - License - Identifier: LGPL - 3.0 - or -later
|
|||||||
Copyright © 2022 Concordia CERC group
|
Copyright © 2022 Concordia CERC group
|
||||||
Project Coder Peter Yefi peteryefi@gmail.com
|
Project Coder Peter Yefi peteryefi@gmail.com
|
||||||
"""
|
"""
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
from hub.imports.geometry_factory import GeometryFactory
|
from hub.imports.geometry_factory import GeometryFactory
|
||||||
@ -38,8 +40,10 @@ class TestEnergySystemsFactory(TestCase):
|
|||||||
Test setup
|
Test setup
|
||||||
:return: None
|
:return: None
|
||||||
"""
|
"""
|
||||||
city_file = "tests_data/C40_Final.gml"
|
self._example_path = (Path(__file__).parent / 'tests_data').resolve()
|
||||||
self._output_path = "tests_data/as_user_output.csv"
|
self._output_path = (Path(__file__).parent / 'tests_outputs').resolve()
|
||||||
|
city_file = (self._example_path/"C40_Final.gml").resolve()
|
||||||
|
self._output_path = (self._output_path/"as_user_output.csv").resolve()
|
||||||
self._city = GeometryFactory('citygml', path=city_file).city
|
self._city = GeometryFactory('citygml', path=city_file).city
|
||||||
EnergySystemsFactory('air_source_hp', self._city).enrich()
|
EnergySystemsFactory('air_source_hp', self._city).enrich()
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ SPDX - License - Identifier: LGPL - 3.0 - or -later
|
|||||||
Copyright © 2022 Concordia CERC group
|
Copyright © 2022 Concordia CERC group
|
||||||
Project Coder Peter Yefi peteryefi@gmail.com
|
Project Coder Peter Yefi peteryefi@gmail.com
|
||||||
"""
|
"""
|
||||||
|
from pathlib import Path
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
|
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
@ -24,8 +25,10 @@ class TestEnergySystemsFactory(TestCase):
|
|||||||
Test setup
|
Test setup
|
||||||
:return: None
|
:return: None
|
||||||
"""
|
"""
|
||||||
city_file = "tests_data/C40_Final.gml"
|
self._example_path = (Path(__file__).parent / 'tests_data').resolve()
|
||||||
self._output_path = "tests_data/w2w_user_output.csv"
|
self._output_path = (Path(__file__).parent / 'tests_outputs').resolve()
|
||||||
|
city_file = (self._example_path / "C40_Final.gml").resolve()
|
||||||
|
self._output_path = (self._output_path / "w2w_user_output.csv").resolve()
|
||||||
self._city = GeometryFactory('citygml', path=city_file).city
|
self._city = GeometryFactory('citygml', path=city_file).city
|
||||||
EnergySystemsFactory('water_to_water_hp', self._city).enrich()
|
EnergySystemsFactory('water_to_water_hp', self._city).enrich()
|
||||||
|
|
||||||
|
@ -24,8 +24,7 @@ class GreeneryInIdf(TestCase):
|
|||||||
"""
|
"""
|
||||||
def test_greenery_in_idf(self):
|
def test_greenery_in_idf(self):
|
||||||
city_file = "tests_data/one_building_in_kelowna.gml"
|
city_file = "tests_data/one_building_in_kelowna.gml"
|
||||||
output_path = Path('tests_outputs/').resolve()
|
output_path = (Path(__file__).parent / 'tests_outputs').resolve()
|
||||||
|
|
||||||
city = GeometryFactory('citygml', path=city_file).city
|
city = GeometryFactory('citygml', path=city_file).city
|
||||||
for building in city.buildings:
|
for building in city.buildings:
|
||||||
building.year_of_construction = 2006
|
building.year_of_construction = 2006
|
||||||
|
Loading…
Reference in New Issue
Block a user