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
db4fd9ca
Commit
db4fd9ca
authored
Aug 04, 2026
by
Eric Duminil
Browse files
Test that CSVs are exported
parent
c47561f3
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/test_simulations.py
View file @
db4fd9ca
...
...
@@ -40,6 +40,31 @@ def test_heat_demand():
assert
kpis
[
"Year of construction"
].
value
==
pytest
.
approx
(
1950
,
abs
=
50
)
assert
kpis
[
"Year of construction"
].
unit
==
None
for
step
in
[
"Geometric"
,
"Physics"
,
"Usage"
]:
for
csv
in
results
.
get_all_by_extension
(
".csv"
):
if
step
in
csv
.
name
:
pytest
.
fail
(
f
"
{
csv
.
name
}
should not have been exported"
)
@
pytest
.
mark
.
integration
def
test_heat_demand_with_csv
():
results
=
run_workflow_with_citygml
(
TEST_TEMPLATES
/
"01_HeatDemand"
,
TEST_GML
,
project_path
=
TEST_PROJECT
,
description
=
"Heat demand – MiniBuchwald"
,
csv_export
=
True
,
)
output_csvs
=
[
csv
.
name
for
csv
in
results
.
get_all_by_extension
(
".csv"
)]
for
step
,
suffixes
in
[
(
"Geometric"
,
[
"buildings"
,
"surfaces"
]),
(
"Physics"
,
[
"buildings"
,
"surfaces"
]),
(
"Usage"
,
[
"buildings"
]),
]:
for
suffix
in
suffixes
:
assert
f
"
{
step
}
_
{
TEST_GML
.
stem
}
_
{
suffix
}
.csv"
in
output_csvs
@
pytest
.
mark
.
integration
def
test_pv
():
...
...
@@ -83,6 +108,7 @@ def test_load_profile():
assert
"Average load"
in
kpis
assert
kpis
[
"Number of buildings"
].
value
>
0
@
pytest
.
mark
.
integration
def
test_energy_grid
():
results
=
run_workflow_with_citygml
(
...
...
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