Skip to content

minor: test_failure_function: use vars #5958

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions testing/test_junitxml.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,22 +477,25 @@ def test_fail():
assert "ValueError" in fnode.toxml()
systemout = fnode.next_sibling
assert systemout.tag == "system-out"
assert "hello-stdout" in systemout.toxml()
assert "info msg" not in systemout.toxml()
systemout_xml = systemout.toxml()
assert "hello-stdout" in systemout_xml
assert "info msg" not in systemout_xml
systemerr = systemout.next_sibling
assert systemerr.tag == "system-err"
assert "hello-stderr" in systemerr.toxml()
assert "info msg" not in systemerr.toxml()
systemerr_xml = systemerr.toxml()
assert "hello-stderr" in systemerr_xml
assert "info msg" not in systemerr_xml

if junit_logging == "system-out":
assert "warning msg" in systemout.toxml()
assert "warning msg" not in systemerr.toxml()
assert "warning msg" in systemout_xml
assert "warning msg" not in systemerr_xml
elif junit_logging == "system-err":
assert "warning msg" not in systemout.toxml()
assert "warning msg" in systemerr.toxml()
elif junit_logging == "no":
assert "warning msg" not in systemout.toxml()
assert "warning msg" not in systemerr.toxml()
assert "warning msg" not in systemout_xml
assert "warning msg" in systemerr_xml
else:
assert junit_logging == "no"
assert "warning msg" not in systemout_xml
assert "warning msg" not in systemerr_xml

@parametrize_families
def test_failure_verbose_message(self, testdir, run_and_parse, xunit_family):
Expand Down