From 4a489af0ff5907c85c171de4f8563119974415ac Mon Sep 17 00:00:00 2001 From: holger krekel Date: Sat, 3 Jul 2010 14:44:47 +0200 Subject: [PATCH] remove the --junitxmlprefix feature - it's kind of YAGNI i guess - i introduced it after 1.3.1 but don't need it anymore and thus it's not going to be there for 1.3.2. --HG-- branch : trunk --- AUTHORS | 4 ++-- CHANGELOG | 17 +++++++---------- py/_plugin/pytest_junitxml.py | 9 +++++---- testing/plugin/test_pytest_junitxml.py | 2 +- 4 files changed, 15 insertions(+), 17 deletions(-) diff --git a/AUTHORS b/AUTHORS index 1af51deea..d142908b1 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,9 +1,9 @@ Holger Krekel, holger at merlinux eu +Benjamin Peterson, benjamin at python org +Ronny Pfannschmidt, Ronny.Pfannschmidt at gmx de Guido Wesdorp, johnny at johnnydebris net Samuele Pedroni, pedronis at openend se Carl Friedrich Bolz, cfbolz at gmx de -Benjamin Peterson, benjamin at python org -Ronny Pfannschmidt, Ronny.Pfannschmidt at gmx de Armin Rigo, arigo at tunes org Maciek Fijalkowski, fijal at genesilico pl Brian Dorsey, briandorsey at gmail com diff --git a/CHANGELOG b/CHANGELOG index 8fca5f9ad..033227284 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -17,9 +17,6 @@ New features (thanks Ronny Pfannschmidt) -- introduce '--junitprefix=STR' option to prepend a prefix - to all reports in the junitxml file. - - Funcarg factories can now dynamically apply a marker to a test invocation. This is for example useful if a factory provides parameters to a test which are expected-to-fail: @@ -36,15 +33,15 @@ Bug fixes / Maintenance - refine --pdb: ignore xfailed tests, unify its TB-reporting and don't display failures again at the end. -- fix assertion interpretation with the ** operator -- fix issue105 assignment on the same line as a failing assertion -- fix issue104 proper escaping for test names in junitxml plugin -- fix issue57 -f|--looponfail to work with xpassing tests -- fix issue92 collectonly reporter and --pastebin +- fix assertion interpretation with the ** operator (thanks Benjamin Peterson) +- fix issue105 assignment on the same line as a failing assertion (thanks Benjamin Peterson) +- fix issue104 proper escaping for test names in junitxml plugin (thanks anonymous) +- fix issue57 -f|--looponfail to work with xpassing tests (thanks Ronny) +- fix issue92 collectonly reporter and --pastebin (thanks Benjamin Peterson) - fix py.code.compile(source) to generate unique filenames - fix assertion re-interp problems on PyPy, by defering code - compilation to the (overridable) Frame.eval class. -- fix pyimport() to work with directories + compilation to the (overridable) Frame.eval class. (thanks Amaury Forgeot) +- fix py.path.local.pyimport() to work with directories - streamline py.path.local.mkdtemp implementation and usage - don't print empty lines when showing junitxml-filename - add optional boolean ignore_errors parameter to py.path.local.remove diff --git a/py/_plugin/pytest_junitxml.py b/py/_plugin/pytest_junitxml.py index 82910114e..de96db180 100644 --- a/py/_plugin/pytest_junitxml.py +++ b/py/_plugin/pytest_junitxml.py @@ -11,14 +11,15 @@ 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.") - group.addoption('--junitprefix', action="store", dest="junitprefix", - metavar="str", default=None, - help="prepend prefix to classnames in junit-xml output") + # 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") def pytest_configure(config): xmlpath = config.option.xmlpath if xmlpath: - config._xml = LogXML(xmlpath, config.option.junitprefix) + config._xml = LogXML(xmlpath, None) # config.option.junitprefix) config.pluginmanager.register(config._xml) def pytest_unconfigure(config): diff --git a/testing/plugin/test_pytest_junitxml.py b/testing/plugin/test_pytest_junitxml.py index a0b97e5d6..b44e2e80b 100644 --- a/testing/plugin/test_pytest_junitxml.py +++ b/testing/plugin/test_pytest_junitxml.py @@ -119,7 +119,7 @@ class TestPython: classname="test_failure_escape.test_failure_escape", name="test_func[&]") - def test_junit_prefixing(self, testdir): + def YAGNI_test_junit_prefixing(self, testdir): testdir.makepyfile(""" def test_func(): assert 0