Skip to content

Commit c29effe

Browse files
committed
fix(tests): change expected return code to 2
This is due to recent changes in Click>=8.2 pallets/click@d8763b93
1 parent e852fb3 commit c29effe

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

tests/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
def test_help() -> None | AssertionError:
1515
"""Test the '--help' option."""
1616
result = runner.invoke(cli)
17-
assert result.exit_code == 0
17+
assert result.exit_code == 2
1818
assert "version" in result.output
1919
assert "status" in result.output
2020

tests/test_sasts.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,22 +90,20 @@ def test_sasts() -> None | AssertionError:
9090
logging.info(f"Checking {sast_name} commands")
9191
sast_cli = sast_data["cli_factory"].build_cli()
9292
result = runner.invoke(sast_cli)
93+
assert result.exit_code == 2
9394
if sast_data["status"] == "full":
94-
assert result.exit_code == 0
9595
assert all(
9696
command in result.output
9797
for command in ["analyze", "benchmark", "list", "plot"]
9898
)
9999
elif sast_data["status"] == "partial":
100-
assert result.exit_code == 0
101100
assert all(
102101
command in result.output for command in ["install", "list", "plot"]
103102
)
104103
elif sast_data["status"] == "none":
105-
assert result.exit_code == 0
106104
assert all(command in result.output for command in ["install"])
107105
else:
108-
assert result.exit_code != 0
106+
assert result.exit_code != 2
109107

110108

111109
SAST_RESULTS = {sast_name: [] for sast_name in SASTS_ALL}

0 commit comments

Comments
 (0)