[svn r63190] no resultlog plugin by default

have custom options come last in "py.test -h"

--HG--
branch : trunk
This commit is contained in:
hpk 2009-03-21 16:17:30 +01:00
parent 2aae6540ff
commit 87de06a124
3 changed files with 7 additions and 5 deletions

View File

@ -10,8 +10,7 @@ Instance = py.test.collect.Instance
conf_iocapture = "fd" # overridable from conftest.py conf_iocapture = "fd" # overridable from conftest.py
# XXX resultlog should go, pypy's nightrun depends on it pytest_plugins = "default terminal xfail tmpdir execnetcleanup monkeypatch".split()
pytest_plugins = "default terminal xfail tmpdir execnetcleanup resultlog monkeypatch".split()
# =================================================== # ===================================================
# settings in conftest only (for now) - for distribution # settings in conftest only (for now) - for distribution

View File

@ -5,8 +5,9 @@ class ResultlogPlugin:
Useful for buildbot integration code. Useful for buildbot integration code.
""" """
def pytest_addoption(self, parser): def pytest_addoption(self, parser):
parser.addoption('--resultlog', action="store", dest="resultlog", group = parser.addgroup("resultlog", "resultlog plugin options")
help="path for machine-readable result log") group.addoption('--resultlog', action="store", dest="resultlog", metavar="path",
help="path for machine-readable result log.")
def pytest_configure(self, config): def pytest_configure(self, config):
resultlog = config.option.resultlog resultlog = config.option.resultlog

View File

@ -78,7 +78,9 @@ class PytestPlugins(object):
return self.pyplugins.notify(eventname, *args, **kwargs) return self.pyplugins.notify(eventname, *args, **kwargs)
def do_addoption(self, parser): def do_addoption(self, parser):
self.pyplugins.call_each('pytest_addoption', parser=parser) methods = self.pyplugins.listattr("pytest_addoption", reverse=True)
mc = py._com.MultiCall(methods, parser=parser)
mc.execute()
def pyevent_plugin_registered(self, plugin): def pyevent_plugin_registered(self, plugin):
if hasattr(self, '_config'): if hasattr(self, '_config'):