fixed bug saving values

This commit is contained in:
Pilar 2022-02-17 12:48:23 -05:00
parent 659df7079c
commit 99f2dea55f
2 changed files with 2 additions and 4 deletions

View File

@ -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]:

View File

@ -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)