Skip to content

Commit ccf057f

Browse files
fixup: junitxml logging test - restore validation for expected output nodes
1 parent 5c4a9c5 commit ccf057f

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
@@ -714,10 +714,14 @@ def test_fail():
714714
node = dom.get_first_by_tag("testsuite")
715715
tnode = node.get_first_by_tag("testcase")
716716

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

722726
@parametrize_families
723727
def test_xfailure_xpass(

0 commit comments

Comments
 (0)