fix issue355: junitxml generates name="pytest" tag.
This commit is contained in:
parent
b5a83a6af1
commit
2bdd034242
|
@ -23,7 +23,9 @@ Changes between 2.3.5 and 2.4.DEV
|
||||||
monkeypatch.replace("requests.get", myfunc
|
monkeypatch.replace("requests.get", myfunc
|
||||||
|
|
||||||
will replace the "get" function of the "requests" module with ``myfunc``.
|
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
|
- fix issue322: tearDownClass is not run if setUpClass failed. Thanks
|
||||||
Mathieu Agopian for the initial fix. Also make all of pytest/nose finalizer
|
Mathieu Agopian for the initial fix. Also make all of pytest/nose finalizer
|
||||||
mimick the same generic behaviour: if a setupX exists and fails,
|
mimick the same generic behaviour: if a setupX exists and fails,
|
||||||
|
|
|
@ -62,8 +62,8 @@ def bin_xml_escape(arg):
|
||||||
|
|
||||||
def pytest_addoption(parser):
|
def pytest_addoption(parser):
|
||||||
group = parser.getgroup("terminal reporting")
|
group = parser.getgroup("terminal reporting")
|
||||||
group.addoption('--junitxml', '--junit-xml', action="store",
|
group.addoption('--junitxml', '--junit-xml', action="store",
|
||||||
dest="xmlpath", metavar="path", default=None,
|
dest="xmlpath", metavar="path", default=None,
|
||||||
help="create junit-xml style report file at given path.")
|
help="create junit-xml style report file at given path.")
|
||||||
group.addoption('--junitprefix', '--junit-prefix', action="store",
|
group.addoption('--junitprefix', '--junit-prefix', action="store",
|
||||||
metavar="str", default=None,
|
metavar="str", default=None,
|
||||||
|
@ -217,7 +217,7 @@ class LogXML(object):
|
||||||
logfile.write('<?xml version="1.0" encoding="utf-8"?>')
|
logfile.write('<?xml version="1.0" encoding="utf-8"?>')
|
||||||
logfile.write(Junit.testsuite(
|
logfile.write(Junit.testsuite(
|
||||||
self.tests,
|
self.tests,
|
||||||
name="",
|
name="pytest",
|
||||||
errors=self.errors,
|
errors=self.errors,
|
||||||
failures=self.failed,
|
failures=self.failed,
|
||||||
skips=self.skipped,
|
skips=self.skipped,
|
||||||
|
|
|
@ -37,7 +37,7 @@ class TestPython:
|
||||||
result, dom = runandparse(testdir)
|
result, dom = runandparse(testdir)
|
||||||
assert result.ret
|
assert result.ret
|
||||||
node = dom.getElementsByTagName("testsuite")[0]
|
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):
|
def test_timing_function(self, testdir):
|
||||||
testdir.makepyfile("""
|
testdir.makepyfile("""
|
||||||
|
|
Loading…
Reference in New Issue