diff --git a/pluggy/__init__.py b/pluggy/__init__.py index 740f63ce..ef324810 100644 --- a/pluggy/__init__.py +++ b/pluggy/__init__.py @@ -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 diff --git a/testing/test_pluginmanager.py b/testing/test_pluginmanager.py index a362de2f..922fc078 100644 --- a/testing/test_pluginmanager.py +++ b/testing/test_pluginmanager.py @@ -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)