reintroduce --junit - i think it is actually useful

--HG--
branch : trunk
This commit is contained in:
holger krekel
2010-07-07 14:43:31 +02:00
parent af5e18e26c
commit 37a2898f18
3 changed files with 13 additions and 11 deletions

View File

@@ -11,15 +11,14 @@ def pytest_addoption(parser):
group.addoption('--junitxml', action="store", dest="xmlpath",
metavar="path", default=None,
help="create junit-xml style report file at given path.")
# probalby YAGNI, therefore commented out:
#group.addoption('--junitprefix', action="store", dest="junitprefix",
# metavar="str", default=None,
# help="prepend prefix to classnames in junit-xml output")
group.addoption('--junitprefix', action="store", dest="junitprefix",
metavar="str", default=None,
help="prepend prefix to classnames in junit-xml output")
def pytest_configure(config):
xmlpath = config.option.xmlpath
if xmlpath:
config._xml = LogXML(xmlpath, None) # config.option.junitprefix)
config._xml = LogXML(xmlpath, config.option.junitprefix)
config.pluginmanager.register(config._xml)
def pytest_unconfigure(config):