Skip to content

Commit 267e40f

Browse files
One extra test
1 parent d74f561 commit 267e40f

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/CLI_test/test_arguments.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,3 +407,21 @@ def test_project_directory_priority_order(tmp_path, monkeypatch, mocker):
407407
f"INFO: Setting current working directory to: {str(default_dir)}"
408408
in result.stdout
409409
)
410+
411+
412+
def test_command_flag_with_stop_on_first_error(project):
413+
"""Test that using --commands with multiple commands raises an error on the first failure"""
414+
# Run with multiple commands, where the first one fails
415+
result = run(
416+
[
417+
"FABulous",
418+
str(project),
419+
"--commands",
420+
"load_fabric non_exist; load_fabric non_exist",
421+
],
422+
capture_output=True,
423+
text=True,
424+
)
425+
426+
assert result.stdout.count("non_exist") == 1
427+
assert result.returncode == 1

0 commit comments

Comments
 (0)