From 99f2dea55f56f7e0c379b24294e765bccd123f8b Mon Sep 17 00:00:00 2001 From: Pilar Date: Thu, 17 Feb 2022 12:48:23 -0500 Subject: [PATCH] fixed bug saving values --- imports/schedules/doe_idf.py | 3 ++- unittests/test_doe_idf.py | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/imports/schedules/doe_idf.py b/imports/schedules/doe_idf.py index df0d0a9e..d8f88f4f 100644 --- a/imports/schedules/doe_idf.py +++ b/imports/schedules/doe_idf.py @@ -86,6 +86,7 @@ class DoeIdf: days_index.append(len(days_schedules)) # save schedule + values = [] for i, day_index in enumerate(days_index): if day_index == len(days_schedules): break @@ -103,10 +104,10 @@ class DoeIdf: entry = days_schedules[hours_values + 1] schedules_day[f'{days_schedules[day_index]}'].append(entry) - values = [] for entry in schedules_day[f'{days_schedules[day_index]}']: values.append(entry) + print(values) schedule.values = values if 'Weekdays' in days_schedules[day_index]: diff --git a/unittests/test_doe_idf.py b/unittests/test_doe_idf.py index 5f85e53c..76ce8440 100644 --- a/unittests/test_doe_idf.py +++ b/unittests/test_doe_idf.py @@ -10,7 +10,6 @@ from imports.usage_factory import UsageFactory from imports.schedules_factory import SchedulesFactory from imports.construction_factory import ConstructionFactory from exports.exports_factory import ExportsFactory -import helpers.constants as cte class TestBuildings(TestCase): @@ -40,9 +39,7 @@ class TestBuildings(TestCase): self.assertIsNot(len(usage_zone.schedules), 0, 'no usage_zones schedules defined') for schedule in usage_zone.schedules: self.assertIsNotNone(schedule.type) - print(schedule.type) self.assertIsNotNone(schedule.values) - print(schedule.values) self.assertIsNotNone(schedule.data_type) self.assertIsNotNone(schedule.time_step) self.assertIsNotNone(schedule.time_range)