call scanning of plugins directly, code is shifted from helpconfig.py to core.py

This commit is contained in:
holger krekel
2014-10-01 12:20:11 +02:00
parent 3de715ec13
commit 351931d5ca
6 changed files with 119 additions and 132 deletions
+1 -4
View File
@@ -47,7 +47,6 @@ class PytestArg:
def gethookrecorder(self, hook):
hookrecorder = HookRecorder(hook._pm)
hookrecorder.start_recording(hook._hookspecs)
self.request.addfinalizer(hookrecorder.finish_recording)
return hookrecorder
@@ -69,9 +68,7 @@ class HookRecorder:
self.calls = []
self._recorders = {}
def start_recording(self, hookspecs):
if not isinstance(hookspecs, (list, tuple)):
hookspecs = [hookspecs]
hookspecs = self._pluginmanager.hook._hookspecs
for hookspec in hookspecs:
assert hookspec not in self._recorders
class RecordCalls: