From b24a616d0000f6a97e73c4ae71ac0a4d31448442 Mon Sep 17 00:00:00 2001 From: p_monsalvete Date: Thu, 14 Sep 2023 12:03:50 -0400 Subject: [PATCH] modified energy plus results importer test --- tests/test_results_import.py | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/tests/test_results_import.py b/tests/test_results_import.py index 775ae083..8f4e0aed 100644 --- a/tests/test_results_import.py +++ b/tests/test_results_import.py @@ -99,9 +99,19 @@ class TestResultsImport(TestCase): csv_output_name = f'{building.name}_out.csv' csv_output_path = (self._example_path / csv_output_name).resolve() if csv_output_path.is_file(): - print(building.name) - print(building.heating_demand) - print(building.heating_demand.keys()) - print(building.cooling_demand) - print(building.cooling_demand.keys()) - + self.assertEqual(building.name, '12') + self.assertIsNotNone(building.heating_demand) + self.assertIsNotNone(building.cooling_demand) + self.assertIsNotNone(building.domestic_hot_water_heat_demand) + self.assertIsNotNone(building.lighting_electrical_demand) + self.assertIsNotNone(building.appliances_electrical_demand) + total_demand = sum(building.heating_demand[cte.HOUR]) + self.assertAlmostEqual(total_demand, building.heating_demand[cte.YEAR][0], 3) + total_demand = sum(building.heating_demand[cte.MONTH]) + self.assertEqual(total_demand, building.heating_demand[cte.YEAR][0], 3) + if building.name != '12': + self.assertDictEqual(building.heating_demand, {}) + self.assertDictEqual(building.cooling_demand, {}) + self.assertDictEqual(building.domestic_hot_water_heat_demand, {}) + self.assertDictEqual(building.lighting_electrical_demand, {}) + self.assertDictEqual(building.appliances_electrical_demand, {})