From a16bfe33c834995baa0e08391cd684acea703745 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Mon, 13 Nov 2017 15:07:11 -0500 Subject: [PATCH] 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. --- testing/test_method_ordering.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/testing/test_method_ordering.py b/testing/test_method_ordering.py index 8c3121dc..905457c6 100644 --- a/testing/test_method_ordering.py +++ b/testing/test_method_ordering.py @@ -290,15 +290,17 @@ def he_method1(self): undo() -def test_prefix_hookimpl(): +@pytest.mark.parametrize('include_hookspec', [True, False]) +def test_prefix_hookimpl(include_hookspec): pm = PluginManager(hookspec.project_name, "hello_") - class HookSpec(object): - @hookspec - def hello_myhook(self, arg1): - """ add to arg1 """ + if include_hookspec: + class HookSpec(object): + @hookspec + def hello_myhook(self, arg1): + """ add to arg1 """ - pm.add_hookspecs(HookSpec) + pm.add_hookspecs(HookSpec) class Plugin(object): def hello_myhook(self, arg1):