From ac19212b2da08dbd4c95e6bf05cd23cbdffef4f7 Mon Sep 17 00:00:00 2001 From: holger krekel Date: Sat, 28 Sep 2013 22:22:57 +0200 Subject: [PATCH] remove very likely unused pytest_plugin_unregister hook (pytest itself and all plugins i know don't use it) --- CHANGELOG | 3 +++ _pytest/core.py | 1 - _pytest/hookspec.py | 5 +---- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 65d561183..23495eefe 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -11,6 +11,9 @@ known incompatibilities: unittest-style) will not be called if the corresponding setup method failed, see issue322 below. +- the pytest_plugin_unregister hook wasn't ever properly called + and there is no known implementation of the hook - so it got removed. + new features: - experimentally allow fixture functions to "yield" instead of "return" diff --git a/_pytest/core.py b/_pytest/core.py index 6d8578d2f..ff506d01b 100644 --- a/_pytest/core.py +++ b/_pytest/core.py @@ -114,7 +114,6 @@ class PluginManager(object): if plugin is None: plugin = self.getplugin(name=name) self._plugins.remove(plugin) - self.hook.pytest_plugin_unregistered(plugin=plugin) for name, value in list(self._name2plugin.items()): if value == plugin: del self._name2plugin[name] diff --git a/_pytest/hookspec.py b/_pytest/hookspec.py index e4098c060..9fe302058 100644 --- a/_pytest/hookspec.py +++ b/_pytest/hookspec.py @@ -236,10 +236,7 @@ pytest_doctest_prepare_content.firstresult = True # ------------------------------------------------------------------------- def pytest_plugin_registered(plugin, manager): - """ a new py lib plugin got registered. """ - -def pytest_plugin_unregistered(plugin): - """ a py lib plugin got unregistered. """ + """ a new pytest plugin got registered. """ def pytest_internalerror(excrepr, excinfo): """ called for internal errors. """