-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable exclude-severity only on csv format
- Loading branch information
1 parent
4f83391
commit c16f33a
Showing
5 changed files
with
30 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import pytest | ||
from click.testing import Result | ||
from typer.testing import CliRunner | ||
|
||
from robusta_krr.main import app, load_commands | ||
|
||
runner = CliRunner(mix_stderr=False) | ||
load_commands() | ||
|
||
|
||
@pytest.mark.parametrize( | ||
"args, expected_exit_code", | ||
[ | ||
(["--exclude-severity", "-f", "csv"], 0), | ||
(["--exclude-severity", "-f", "table"], 2), | ||
(["--exclude-severity"], 2), | ||
], | ||
) | ||
def test_exclude_severity_option(args: list[str], expected_exit_code: int) -> None: | ||
result: Result = runner.invoke(app, ["simple", *args]) | ||
assert result.exit_code == expected_exit_code |