From ccf057fb609b79c04c4a4c48fc310498eb56b2ed Mon Sep 17 00:00:00 2001 From: Ronny Pfannschmidt Date: Sat, 22 Jun 2024 15:29:43 +0200 Subject: [PATCH] fixup: junitxml logging test - restore validation for expected output nodes --- testing/test_junitxml.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/testing/test_junitxml.py b/testing/test_junitxml.py index 084bbec73..746984f8d 100644 --- a/testing/test_junitxml.py +++ b/testing/test_junitxml.py @@ -714,10 +714,14 @@ class TestPython: node = dom.get_first_by_tag("testsuite") tnode = node.get_first_by_tag("testcase") - has_logging = junit_logging in ["system-err", "out-err", "all"] - expected_output_len = 1 if has_logging else 0 - print(tnode) - assert len(tnode.find_by_tag("system-err")) == expected_output_len + has_err_logging = junit_logging in ["system-err", "out-err", "all"] + expected_err_output_len = 1 if has_err_logging else 0 + assert len(tnode.find_by_tag("system-err")) == expected_err_output_len + + has_out_logigng = junit_logging in ("log", "system-out", "out-err", "all") + expected_out_output_len = 1 if has_out_logigng else 0 + + assert len(tnode.find_by_tag("system-out")) == expected_out_output_len @parametrize_families def test_xfailure_xpass(