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
7b3dcbc8
Commit
7b3dcbc8
authored
Sep 20, 2026
by
Eric Duminil
Browse files
Testing CLI with just workflow name
parent
15ed1284
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/test_runner.py
View file @
7b3dcbc8
...
...
@@ -3,6 +3,8 @@
import
shutil
from
pathlib
import
Path
import
pytest
from
simstadt.runner
import
run_workflow_with_citygml
TEST_DATA
=
Path
(
__file__
).
parent
/
"data"
...
...
@@ -86,3 +88,15 @@ def test_citygml_creates_temp_repo(mock_simstadt):
assert
results
is
not
None
assert
"simstadt_repo"
in
str
(
results
.
workflow_path
)
assert
results
.
workflow_path
.
suffix
==
".flow"
@
pytest
.
mark
.
integration
def
test_bundled_template_name_resolves_without_env_var
(
simstadt_folder
,
monkeypatch
,
tmp_path
):
"""A bare bundled template name (e.g. "103_PV") resolves via get_template_path()'s
fallback to the package's own templates/ directory, even with no SIMSTADT_TEMPLATE_PATH
set — regression test for a real (non-mocked) SimStadt run."""
monkeypatch
.
delenv
(
"SIMSTADT_TEMPLATE_PATH"
,
raising
=
False
)
results
=
run_workflow_with_citygml
(
"103_PV"
,
CITYGML
,
project_path
=
tmp_path
/
"Test.proj"
)
assert
any
(
kpi
.
name
==
"PV potential yield"
for
kpi
in
results
.
kpis
)
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