nose-devs/nose — Issue #367: 0.11.2 - builtin plugins are overriding external plugins (opposite of expected behavior)
Author: jpellerin
Created: 2011-12-14 16:09:16+00:00
State: closed

What steps will reproduce the problem?

1. Create an external 0.10 plugin with same name as existing plugin, say
'attributeselector'.

2. See it get overriden by the builtin attrib plugin. For example, if your
external plugin simply adds a new parser option, you'll see that this new
option is not recognized when the plugin's name is 'attributeselector' (but
is available when named something else).

What is the expected output? What do you see instead?

The expected output is my interpretation of the 0.11.2 release notes:

"Changed plugin loading so that external plugins loaded via extension
points can override builtin plugins with the same name."

The opposite is happening.

What version of the product are you using? On what operating system?

nose 0.11.2 on Centos 5.

Please provide any additional information below.

I can get the desired behavior to work if I simply swap the ordering of
plugin loading as follows in nose.plugins.manager.py:394-404:

from:

class BuiltinPluginManager(PluginManager):
"""Plugin manager that loads plugins from the list in
`nose.plugins.builtin`.
"""
def loadPlugins(self):
"""Load plugins in nose.plugins.builtin
"""
super(BuiltinPluginManager, self).loadPlugins()
from nose.plugins import builtin
for plug in builtin.plugins:
self.addPlugin(plug())

to:

class BuiltinPluginManager(PluginManager):
"""Plugin manager that loads plugins from the list in
`nose.plugins.builtin`.
"""
def loadPlugins(self):
"""Load plugins in nose.plugins.builtin
"""
from nose.plugins import builtin
for plug in builtin.plugins:
self.addPlugin(plug())
super(BuiltinPluginManager, self).loadPlugins()

Google Code Info:
Issue #: 323
Author: rob.dayl...@gmail.com
Created On: 2010-03-05T19:37:55.000Z
Closed On: 2010-03-05T20:37:17.000Z