minor: test_failure_function: use vars (#5958)

minor: test_failure_function: use vars
This commit is contained in:
Bruno Oliveira 2019-10-15 19:48:41 -03:00 committed by GitHub
commit f739d511b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 11 deletions

View File

@ -477,22 +477,25 @@ class TestPython:
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):