diff --git a/_pytest/__init__.py b/_pytest/__init__.py index 3238a6f70..a53f8e125 100644 --- a/_pytest/__init__.py +++ b/_pytest/__init__.py @@ -1,2 +1,2 @@ # -__version__ = '2.1.1.dev2' +__version__ = '2.1.1.dev3' diff --git a/_pytest/junitxml.py b/_pytest/junitxml.py index 31aeb2343..3d436d776 100644 --- a/_pytest/junitxml.py +++ b/_pytest/junitxml.py @@ -115,15 +115,13 @@ class LogXML(object): self.skipped += 1 else: sec = dict(report.sections) - fmt = '%s' - args = [report.longrepr] + self.appendlog('%s', + report.longrepr) for name in ('out', 'err'): content = sec.get("Captured std%s" % name) if content: - fmt += "%%s" % (name, name) - args.append(content) - fmt += "" - self.appendlog(fmt, *args) + self.appendlog( + "%%s" % (name, name), content) self.failed += 1 self._closetestcase() diff --git a/setup.py b/setup.py index fd5688ad8..49bc3a62d 100644 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ def main(): name='pytest', description='py.test: simple powerful testing with Python', long_description = long_description, - version='2.1.1.dev2', + version='2.1.1.dev3', url='http://pytest.org', license='MIT license', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], diff --git a/testing/test_junitxml.py b/testing/test_junitxml.py index 96efb6fca..54e440601 100644 --- a/testing/test_junitxml.py +++ b/testing/test_junitxml.py @@ -150,9 +150,11 @@ class TestPython: fnode = tnode.getElementsByTagName("failure")[0] assert_attr(fnode, message="test failure") assert "ValueError" in fnode.toxml() - systemout = fnode.getElementsByTagName("system-out")[0] + systemout = fnode.nextSibling + assert systemout.tagName == "system-out" assert "hello-stdout" in systemout.toxml() - systemerr = fnode.getElementsByTagName("system-err")[0] + systemerr = systemout.nextSibling + assert systemerr.tagName == "system-err" assert "hello-stderr" in systemerr.toxml() def test_failure_escape(self, testdir):