[svn r62281] allowing a plugin to see its registration and unregistration events.

--HG--
branch : trunk
This commit is contained in:
hpk 2009-03-01 08:50:45 +01:00
parent 3561d2e9ff
commit 1f70447dde
2 changed files with 1 additions and 4 deletions

View File

@ -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)

View File

@ -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: