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
674a40af
Commit
674a40af
authored
Mar 14, 2026
by
Eric Duminil
Browse files
Unneeded
parent
4cfb1914
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/test_cli.py
View file @
674a40af
...
...
@@ -65,25 +65,6 @@ def test_parser_all_flags():
assert
args
.
save
==
Path
(
"out.csv"
)
# ---------------------------------------------------------------------------
# Dispatch
# ---------------------------------------------------------------------------
def
test_no_args_calls_info
(
monkeypatch
,
capsys
):
monkeypatch
.
setattr
(
sys
,
"argv"
,
[
"simstadt"
])
monkeypatch
.
setattr
(
"simstadt.cli.cmd_info"
,
lambda
args
:
print
(
"info called"
))
app
()
assert
"info called"
in
capsys
.
readouterr
().
out
def
test_template_and_citygml_calls_run
(
monkeypatch
,
capsys
):
monkeypatch
.
setattr
(
sys
,
"argv"
,
[
"simstadt"
,
"tmpl"
,
"city.gml"
])
monkeypatch
.
setattr
(
"simstadt.cli.cmd_run"
,
lambda
args
:
print
(
"run called"
))
app
()
assert
"run called"
in
capsys
.
readouterr
().
out
# ---------------------------------------------------------------------------
# cmd_run
# ---------------------------------------------------------------------------
...
...
@@ -130,7 +111,7 @@ def test_run_error_on_stderr(monkeypatch, capsys, tmp_path):
with
pytest
.
raises
(
SystemExit
):
app
()
out
,
err
=
capsys
.
readouterr
()
assert
"
boom
"
in
err
assert
"
BOOM
"
in
err
assert
out
==
""
...
...
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