Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pluggy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ def _add_hookimpl(self, hookimpl):
warnings.warn(
"Support for __multicall__ is now deprecated and will be"
"removed in an upcoming release.",
warnings.DeprecationWarning
DeprecationWarning
)
self.multicall = _LegacyMultiCall

Expand Down
9 changes: 9 additions & 0 deletions testing/test_pluginmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,15 @@ class PluginNo(object):
assert l == [10]


def test_multicall_deprecated(pm):
class P1(object):
@hookimpl
def m(self, __multicall__, x):
pass

pytest.deprecated_call(pm.register, P1())


def test_add_hookspecs_nohooks(pm):
with pytest.raises(ValueError):
pm.add_hookspecs(10)