Commit 7b3dcbc8 authored by Eric Duminil's avatar Eric Duminil
Browse files

Testing CLI with just workflow name

parent 15ed1284
......@@ -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)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment