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
1c5b5973
Commit
1c5b5973
authored
May 16, 2026
by
Eric Duminil
Browse files
More tests for PV
parent
c6a189a7
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/test_simulations.py
View file @
1c5b5973
"""Live integration tests for SimStadt workflows. Skipped if SimStadt is not installed."""
"""Live integration tests for SimStadt workflows. Skipped if SimStadt is not installed."""
from
pathlib
import
Path
from
pathlib
import
Path
import
rich
import
pytest
import
pytest
import
rich
from
simstadt.results
import
KPI
from
simstadt.results
import
KPI
from
simstadt.runner
import
run_workflow_with_citygml
from
simstadt.runner
import
run_workflow_with_citygml
...
@@ -54,7 +54,14 @@ def test_pv():
...
@@ -54,7 +54,14 @@ def test_pv():
assert
"PV potential yield"
in
kpis
assert
"PV potential yield"
in
kpis
assert
"Roof area for PV"
in
kpis
assert
"Roof area for PV"
in
kpis
assert
kpis
[
"PV potential yield"
].
value
>
0
assert
kpis
[
"PV potential yield"
].
value
>
0
assert
kpis
[
"Roof area for PV"
].
value
>
0
assert
kpis
[
"PV potential nominal power"
].
value
>
0
assert
kpis
[
"PV potential nominal power"
].
unit
==
"kWp"
assert
kpis
[
"Irradiance in module plane"
].
unit
==
"W / m²"
assert
kpis
[
"Irradiance in module plane"
].
value
==
pytest
.
approx
(
150
,
abs
=
20
)
assert
kpis
[
"PV specific yield"
].
unit
==
"kWh / (kWp · a)"
assert
kpis
[
"PV specific yield"
].
value
==
pytest
.
approx
(
1100
,
abs
=
100
)
assert
kpis
[
"Roof area for PV"
].
value
>
100
assert
kpis
[
"Roof area for PV"
].
unit
==
'm²'
@
pytest
.
mark
.
integration
@
pytest
.
mark
.
integration
...
@@ -69,6 +76,6 @@ def test_load_profile():
...
@@ -69,6 +76,6 @@ def test_load_profile():
rich
.
print
(
kpis
)
rich
.
print
(
kpis
)
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"
in
kpis
assert
"Average load"
in
kpis
assert
kpis
[
"Number of buildings"
].
value
>
0
assert
kpis
[
"Number of buildings"
].
value
>
0
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