Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
SimStadt
simstadtpy
Commits
45fdd093
Commit
45fdd093
authored
Mar 12, 2026
by
Eric Duminil
Browse files
TODOs
parent
db802a85
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/test_simulations.py
View file @
45fdd093
...
@@ -18,7 +18,7 @@ def to_dict(values: list[KPI]) -> dict[str, KPI]:
...
@@ -18,7 +18,7 @@ def to_dict(values: list[KPI]) -> dict[str, KPI]:
@
pytest
.
mark
.
live
@
pytest
.
mark
.
live
def
test_heat_demand
(
simstadt_folder
):
def
test_heat_demand
():
results
=
run_workflow_with_citygml
(
results
=
run_workflow_with_citygml
(
TEST_TEMPLATES
/
"01_HeatDemand"
,
TEST_TEMPLATES
/
"01_HeatDemand"
,
TEST_GML
,
TEST_GML
,
...
@@ -29,12 +29,13 @@ def test_heat_demand(simstadt_folder):
...
@@ -29,12 +29,13 @@ def test_heat_demand(simstadt_folder):
assert
"Heated area"
in
kpis
assert
"Heated area"
in
kpis
assert
"Yearly Heating demand"
in
kpis
assert
"Yearly Heating demand"
in
kpis
# TODO: More detailed tests
assert
kpis
[
"Yearly Heating demand"
].
value
>
0
assert
kpis
[
"Yearly Heating demand"
].
value
>
0
assert
kpis
[
"Heated area"
].
value
>
0
assert
kpis
[
"Heated area"
].
value
>
0
@
pytest
.
mark
.
live
@
pytest
.
mark
.
live
def
test_pv
(
simstadt_folder
):
def
test_pv
():
results
=
run_workflow_with_citygml
(
results
=
run_workflow_with_citygml
(
TEST_TEMPLATES
/
"03_PV"
,
TEST_TEMPLATES
/
"03_PV"
,
TEST_GML
,
TEST_GML
,
...
@@ -50,7 +51,7 @@ def test_pv(simstadt_folder):
...
@@ -50,7 +51,7 @@ def test_pv(simstadt_folder):
@
pytest
.
mark
.
live
@
pytest
.
mark
.
live
def
test_load_profile
(
simstadt_folder
):
def
test_load_profile
():
results
=
run_workflow_with_citygml
(
results
=
run_workflow_with_citygml
(
TEST_TEMPLATES
/
"02_LoadProfile"
,
TEST_TEMPLATES
/
"02_LoadProfile"
,
TEST_GML
,
TEST_GML
,
...
@@ -62,3 +63,5 @@ def test_load_profile(simstadt_folder):
...
@@ -62,3 +63,5 @@ def test_load_profile(simstadt_folder):
assert
"Number of buildings"
in
kpis
assert
"Number of buildings"
in
kpis
assert
"Total load [MWh]"
in
kpis
or
any
(
"load"
in
k
.
lower
()
for
k
in
kpis
)
assert
"Total load [MWh]"
in
kpis
or
any
(
"load"
in
k
.
lower
()
for
k
in
kpis
)
assert
kpis
[
"Number of buildings"
].
value
>
0
assert
kpis
[
"Number of buildings"
].
value
>
0
# TODO: Add greenwater tests from CGSC too
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment