Skip to content

Commit 463458b

Browse files
fixup: junitxml logging test - restore validation for expected output nodes
1 parent 3c1f8b4 commit 463458b

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

testing/test_junitxml.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -715,10 +715,14 @@ def test_fail():
715715
node = dom.get_first_by_tag("testsuite")
716716
tnode = node.get_first_by_tag("testcase")
717717

718-
has_logging = junit_logging in ["system-err", "out-err", "all"]
719-
expected_output_len = 1 if has_logging else 0
720-
print(tnode)
721-
assert len(tnode.find_by_tag("system-err")) == expected_output_len
718+
has_err_logging = junit_logging in ["system-err", "out-err", "all"]
719+
expected_err_output_len = 1 if has_err_logging else 0
720+
assert len(tnode.find_by_tag("system-err")) == expected_err_output_len
721+
722+
has_out_logigng = junit_logging in ("log", "system-out", "out-err", "all")
723+
expected_out_output_len = 1 if has_out_logigng else 0
724+
725+
assert len(tnode.find_by_tag("system-out")) == expected_out_output_len
722726

723727
@parametrize_families
724728
def test_xfailure_xpass(

0 commit comments

Comments
 (0)