properly perform hook calls with extra methods

--HG--
branch : more_plugin
This commit is contained in:
holger krekel
2015-04-25 11:29:11 +02:00
parent a63585dcab
commit 2f8a1aed6e
3 changed files with 37 additions and 10 deletions

View File

@@ -129,7 +129,18 @@ class TestPluginManager:
return arg * 10
pm.register(Plugin())
assert l == [10]
def test_call_extra(self, pm):
class Hooks:
def he_method1(self, arg):
pass
pm.addhooks(Hooks)
def he_method1(arg):
return arg * 10
l = pm.hook.he_method1.callextra([he_method1], arg=1)
assert l == [10]