merge heads
This commit is contained in:
commit
85415135a4
|
@ -1,2 +1,2 @@
|
||||||
#
|
#
|
||||||
__version__ = '2.1.1.dev2'
|
__version__ = '2.1.1.dev3'
|
||||||
|
|
|
@ -115,15 +115,13 @@ class LogXML(object):
|
||||||
self.skipped += 1
|
self.skipped += 1
|
||||||
else:
|
else:
|
||||||
sec = dict(report.sections)
|
sec = dict(report.sections)
|
||||||
fmt = '<failure message="test failure">%s'
|
self.appendlog('<failure message="test failure">%s</failure>',
|
||||||
args = [report.longrepr]
|
report.longrepr)
|
||||||
for name in ('out', 'err'):
|
for name in ('out', 'err'):
|
||||||
content = sec.get("Captured std%s" % name)
|
content = sec.get("Captured std%s" % name)
|
||||||
if content:
|
if content:
|
||||||
fmt += "<system-%s>%%s</system-%s>" % (name, name)
|
self.appendlog(
|
||||||
args.append(content)
|
"<system-%s>%%s</system-%s>" % (name, name), content)
|
||||||
fmt += "</failure>"
|
|
||||||
self.appendlog(fmt, *args)
|
|
||||||
self.failed += 1
|
self.failed += 1
|
||||||
self._closetestcase()
|
self._closetestcase()
|
||||||
|
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -24,7 +24,7 @@ def main():
|
||||||
name='pytest',
|
name='pytest',
|
||||||
description='py.test: simple powerful testing with Python',
|
description='py.test: simple powerful testing with Python',
|
||||||
long_description = long_description,
|
long_description = long_description,
|
||||||
version='2.1.1.dev2',
|
version='2.1.1.dev3',
|
||||||
url='http://pytest.org',
|
url='http://pytest.org',
|
||||||
license='MIT license',
|
license='MIT license',
|
||||||
platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],
|
platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],
|
||||||
|
|
|
@ -150,9 +150,11 @@ class TestPython:
|
||||||
fnode = tnode.getElementsByTagName("failure")[0]
|
fnode = tnode.getElementsByTagName("failure")[0]
|
||||||
assert_attr(fnode, message="test failure")
|
assert_attr(fnode, message="test failure")
|
||||||
assert "ValueError" in fnode.toxml()
|
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()
|
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()
|
assert "hello-stderr" in systemerr.toxml()
|
||||||
|
|
||||||
def test_failure_escape(self, testdir):
|
def test_failure_escape(self, testdir):
|
||||||
|
|
Loading…
Reference in New Issue