bobber6467 / python-nose

Automatically exported from code.google.com/p/python-nose
0 stars 0 forks source link

Plugins included with addplugins keyword are overriden by builtin or third-party plugins registered with setuptools #466

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a new plugin with the same name as a builtin plugin (or a third-party 
plugin registered with setuptools)

2. Include your plugin in a nose testrun using the addplugins keyword:
nose.main(addplugins=[CustomPlugin()])

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

I expected plugins a user explicitly includes with the addplugins keyword to 
take precedence over built-in or other third-party plugins. The opposite seems 
to be true. Setuptools-registered plugins override built-in plugins, which 
override addplugins.

Please use labels and text to provide additional information.

If you include plugins with the addplugins keyword, those plugins get added 
immediately with config.plugins.addPlugins(). Then, later on, when 
loadPlugins() is called as part of getParser(), the builtin plugins are loaded, 
as are third-party plugins registered using setuptools. Those plugins will 
overwrite any previously-added (from addplugins) plugins with the same name.

Original issue reported on code.google.com by BrendanM...@gmail.com on 11 Nov 2011 at 5:35

GoogleCodeExporter commented 8 years ago
Thanks!  Fixed in:
http://code.google.com/p/python-nose/source/detail?r=ea4ea8f3b70f03378aad8cccc57
59cfc987c5177
http://code.google.com/p/python-nose/source/detail?r=9904a11a39473ea35de4d668357
fe500344e00be

Original comment by kumar.mcmillan on 11 Nov 2011 at 6:04