Merge remote-tracking branch 'origin/master'

This commit is contained in:
atiya 2021-11-18 16:56:05 -05:00
commit 1426a7aaa4
2 changed files with 11 additions and 1 deletions

View File

@ -32,7 +32,7 @@ class YearlyFromDailySchedules:
values = []
for month in range(1, 13):
for day in range(1, cal._monthlen(self._year, month)+1):
for day in range(1, cal.monthlen(self._year, month)+1):
week_day = cal.weekday(self._year, month, day)
values.extend(weekly_schedules[week_day])
yearly_schedule.type = self._daily_schedules[0].type

View File

@ -7,6 +7,7 @@ from pathlib import Path
from unittest import TestCase
from imports.geometry_factory import GeometryFactory
from imports.construction_factory import ConstructionFactory
from imports.usage_factory import UsageFactory
from imports.construction_factory import ConstructionFactory
from imports.geometry.helpers.geometry_helper import GeometryHelper
@ -29,6 +30,15 @@ class TestUsageFactory(TestCase):
self.assertIsNotNone(_city, 'city is none')
return _city
def test_comnet(self):
file = 'pluto_building.gml'
city = self._get_citygml(file)
for building in city.buildings:
building.function = GeometryHelper.pluto_to_function[building.function]
ConstructionFactory('nrel', city).enrich()
UsageFactory('comnet', city).enrich()
def test_city_with_usage(self):
"""
Enrich the city with the usage information and verify it