Skip to content

Commit

Permalink
test: fix cli test which fails only under lxml
Browse files Browse the repository at this point in the history
under `lxml` the `encoding` property "UTF-8" is written in capslock, without `lxml` its lowercase.
So we ignore that property and only test for the "<?xml version='1.0'" part
  • Loading branch information
Cube707 committed Feb 10, 2025
1 parent b642f33 commit 71382d1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

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


@pytest.mark.parametrize(
"file, expected_exitcode",
[("jenkins.xml", 1), ("no_fails.xml", 0), ("normal.xml", 1)],
Expand All @@ -29,7 +28,7 @@ def test_merge_output_to_terminal(capsys: pytest.CaptureFixture):
ret = cli.main(["merge", str(DATA_DIR / "normal.xml"), "-"])
assert ret == 0
captured = capsys.readouterr()
assert captured.out.startswith("<?xml version='1.0' encoding='utf-8'?>")
assert captured.out.startswith("<?xml version='1.0'")


def test_verify_with_glob():
Expand Down

0 comments on commit 71382d1

Please sign in to comment.