fix issue355: junitxml generates name="pytest" tag.

This commit is contained in:
holger krekel 2013-09-26 08:45:50 +02:00
parent b5a83a6af1
commit 2bdd034242
3 changed files with 7 additions and 5 deletions

View File

@ -24,6 +24,8 @@ Changes between 2.3.5 and 2.4.DEV
will replace the "get" function of the "requests" module with ``myfunc``.
- fix issue355: junitxml puts name="pytest" attribute to testsuite tag.
- fix issue322: tearDownClass is not run if setUpClass failed. Thanks
Mathieu Agopian for the initial fix. Also make all of pytest/nose finalizer
mimick the same generic behaviour: if a setupX exists and fails,

View File

@ -217,7 +217,7 @@ class LogXML(object):
logfile.write('<?xml version="1.0" encoding="utf-8"?>')
logfile.write(Junit.testsuite(
self.tests,
name="",
name="pytest",
errors=self.errors,
failures=self.failed,
skips=self.skipped,

View File

@ -37,7 +37,7 @@ class TestPython:
result, dom = runandparse(testdir)
assert result.ret
node = dom.getElementsByTagName("testsuite")[0]
assert_attr(node, errors=0, failures=1, skips=3, tests=2)
assert_attr(node, name="pytest", errors=0, failures=1, skips=3, tests=2)
def test_timing_function(self, testdir):
testdir.makepyfile("""