From 1f70447ddefb568ea34e1454df233e9cc5d51a13 Mon Sep 17 00:00:00 2001 From: hpk Date: Sun, 1 Mar 2009 08:50:45 +0100 Subject: [PATCH] [svn r62281] allowing a plugin to see its registration and unregistration events. --HG-- branch : trunk --- py/_com.py | 2 +- py/misc/testing/test_com.py | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/py/_com.py b/py/_com.py index a76829abd..a93cd876f 100644 --- a/py/_com.py +++ b/py/_com.py @@ -105,8 +105,8 @@ class PyPlugins: self.notify("plugin_registered", plugin) def unregister(self, plugin): - self._plugins.remove(plugin) self.notify("plugin_unregistered", plugin) + self._plugins.remove(plugin) def getplugins(self): return list(self._plugins) diff --git a/py/misc/testing/test_com.py b/py/misc/testing/test_com.py index 4a4c4a0bd..99155ded3 100644 --- a/py/misc/testing/test_com.py +++ b/py/misc/testing/test_com.py @@ -72,10 +72,7 @@ class TestPyPlugins: assert not plugins.isregistered(my) assert plugins.getplugins() == [my2] - #@py.test.mark.xfail def test_onregister(self): - py.test.skip("implement exitfirst plugin and " - "modify xfail plugin to override exitfirst behaviour?") plugins = PyPlugins() l = [] class MyApi: