Skip to content

Commit

Permalink
test: fix linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Cube707 committed Feb 10, 2025
1 parent 416d59a commit 5550539
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

DATA_DIR = Path(__file__).parent / "data"


@pytest.mark.parametrize(
"file, expected_exitcode",
[("jenkins.xml", 1), ("no_fails.xml", 0), ("normal.xml", 1)],
Expand Down Expand Up @@ -45,14 +46,14 @@ def setup_class(cls):

@pytest.mark.parametrize("arg", ["-v", "--version"])
def test_version(self, arg, capsys):
with pytest.raises(SystemExit) as e:
with pytest.raises(SystemExit) as e: # noqa F841
self.parser.parse_args([arg])
captured = capsys.readouterr()
assert e.value.code == 0
assert captured.out == f"junitparser {version}\n"

def test_help_shows_subcommands(self, capsys):
with pytest.raises(SystemExit) as e:
with pytest.raises(SystemExit) as e: # noqa F841
self.parser.parse_args(["--help"])
captured = capsys.readouterr()
assert "{merge,verify} ...\n" in captured.out
Expand Down

0 comments on commit 5550539

Please sign in to comment.