Partially correct unit-test

This commit is contained in:
Guille Gutierrez 2023-07-25 16:00:14 -04:00
parent 066a25bfee
commit 35e50cf551
3 changed files with 12 additions and 6 deletions

View File

@ -4,6 +4,8 @@ SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2022 Concordia CERC group
Project Coder Peter Yefi peteryefi@gmail.com
"""
from pathlib import Path
import pandas as pd
from unittest import TestCase
from hub.imports.geometry_factory import GeometryFactory
@ -38,8 +40,10 @@ class TestEnergySystemsFactory(TestCase):
Test setup
:return: None
"""
city_file = "tests_data/C40_Final.gml"
self._output_path = "tests_data/as_user_output.csv"
self._example_path = (Path(__file__).parent / 'tests_data').resolve()
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
EnergySystemsFactory('air_source_hp', self._city).enrich()

View File

@ -4,6 +4,7 @@ SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2022 Concordia CERC group
Project Coder Peter Yefi peteryefi@gmail.com
"""
from pathlib import Path
from unittest import TestCase
import pandas as pd
@ -24,8 +25,10 @@ class TestEnergySystemsFactory(TestCase):
Test setup
:return: None
"""
city_file = "tests_data/C40_Final.gml"
self._output_path = "tests_data/w2w_user_output.csv"
self._example_path = (Path(__file__).parent / 'tests_data').resolve()
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
EnergySystemsFactory('water_to_water_hp', self._city).enrich()

View File

@ -24,8 +24,7 @@ class GreeneryInIdf(TestCase):
"""
def test_greenery_in_idf(self):
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
for building in city.buildings:
building.year_of_construction = 2006