Skip to content

Commit f335bb5

Browse files
author
Tyler Goodlet
committed
Test hook collection by project name without a spec
Triggers a regression introduced during refactoring of the multicall loop. Demonstrates the issue described in #99.
1 parent 01d3589 commit f335bb5

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

testing/test_method_ordering.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -290,15 +290,17 @@ def he_method1(self):
290290
undo()
291291

292292

293-
def test_prefix_hookimpl():
293+
@pytest.mark.parametrize('include_hookspec', [True, False])
294+
def test_prefix_hookimpl(include_hookspec):
294295
pm = PluginManager(hookspec.project_name, "hello_")
295296

296-
class HookSpec(object):
297-
@hookspec
298-
def hello_myhook(self, arg1):
299-
""" add to arg1 """
297+
if include_hookspec:
298+
class HookSpec(object):
299+
@hookspec
300+
def hello_myhook(self, arg1):
301+
""" add to arg1 """
300302

301-
pm.add_hookspecs(HookSpec)
303+
pm.add_hookspecs(HookSpec)
302304

303305
class Plugin(object):
304306
def hello_myhook(self, arg1):

0 commit comments

Comments
 (0)