fix some doc strings

--HG--
branch : more_plugin
This commit is contained in:
holger krekel 2015-04-26 00:22:34 +02:00
parent 32165d82b1
commit 0c961deeaa
2 changed files with 10 additions and 10 deletions

View File

@ -118,7 +118,7 @@ class PytestPluginManager(PluginManager):
self.trace.root.setwriter(err.write)
self.enable_tracing()
def register(self, plugin, name=None, conftest=False):
def register(self, plugin, name=None):
ret = super(PytestPluginManager, self).register(plugin, name)
if ret:
self.hook.pytest_plugin_registered.call_historic(
@ -263,8 +263,7 @@ class PytestPluginManager(PluginManager):
self.import_plugin(arg)
def consider_conftest(self, conftestmodule):
if self.register(conftestmodule, name=conftestmodule.__file__,
conftest=True):
if self.register(conftestmodule, name=conftestmodule.__file__):
self.consider_module(conftestmodule)
def consider_env(self):

View File

@ -203,9 +203,8 @@ class PluginManager(object):
plugin objects. An optional excludefunc allows to blacklist names which
are not considered as hooks despite a matching prefix.
For debugging purposes you can call ``set_tracing(writer)``
which will subsequently send debug information to the specified
write function.
For debugging purposes you can call ``enable_tracing()``
which will subsequently send debug information to the trace helper.
"""
def __init__(self, prefix, excludefunc=None):
@ -219,6 +218,8 @@ class PluginManager(object):
MultiCall(methods, kwargs, hook.firstresult).execute()
def _hookexec(self, hook, methods, kwargs):
# called from all hookcaller instances.
# enable_tracing will set its own wrapping function at self._inner_hookexec
return self._inner_hookexec(hook, methods, kwargs)
def enable_tracing(self):
@ -237,9 +238,9 @@ class PluginManager(object):
return TracedHookExecution(self, before, after).undo
def subset_hook_caller(self, name, remove_plugins):
""" Return a new HookCaller instance which manages calls to
the plugins but without hooks from the plugins in remove_plugins
taking part. """
""" Return a new HookCaller instance for the named method
which manages calls to all registered plugins except the
ones from remove_plugins. """
hc = getattr(self.hook, name)
plugins_to_remove = [plugin for plugin in remove_plugins
if hasattr(plugin, name)]
@ -496,7 +497,7 @@ class HookCaller(object):
hc.argnames = self.argnames
hc.firstresult = self.firstresult
# we keep track of this hook caller so it
# gets properly removed on plugin unregistration
# gets properly pruned on plugin unregistration
self._subcaller.append(hc)
return hc