We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 557cd3f commit f087c1eCopy full SHA for f087c1e
testing/test_hookrelay.py
@@ -87,9 +87,17 @@ class Plugin3(object):
87
def hello(self, arg):
88
return None
89
90
+ class Plugin4(object):
91
+ @hookimpl(hookwrapper=True)
92
+ def hello(self, arg):
93
+ assert arg == 3
94
+ outcome = yield
95
+ assert outcome.get_result() == 2
96
+
97
pm.register(Plugin1()) # discarded - not the last registered plugin
98
pm.register(Plugin2()) # used as result
99
pm.register(Plugin3()) # None result is ignored
100
+ pm.register(Plugin4()) # hookwrapper should get same non-list result
101
res = pm.hook.hello(arg=3)
102
assert res == 2
103
0 commit comments