[TIP] nose2: the nosening

Michael Foord fuzzyman at voidspace.org.uk
Fri Aug 6 09:16:21 PDT 2010

On 06/08/2010 14:12, jason pellerin wrote:
>> Do you *just* want to load plugins and not any extra configuration into the
>> config data structure? If that is the case why not just call loadPlugin for
>> each of the plugins you want to load?
> No, I want them to load just like plugins specified in a config file,
> because if I don't, as you say...
>> The config files won't be loaded at this stage, it just means that any info
>> you want from the user config files should be pulled out in the
>> pluginsLoaded event instead of the __init__ method of the plugin.
> ... then I have to write the auto-loaded plugins differently from
> other plugins, which seems wrong. So I'd like some way to tell
> TestProgram to load a batch of plugins along with whatever
> user-specified ones it finds. Nose does this via an optional
> addplugins arg to TestProgram -- which is also very useful in writing
> tests for plugins. So I'd like to see something like that, or the
> ability to specify one or more config files to load in addition to the
> default/user-specified config.

Ok - this could also be useful for others too. main(...) now takes a 
config parameter. This can be the location of a config file and it will 
be loaded in *addition* to the standard config files.

Note that config files can have an 'excluded-plugins' section if you 
want to disable the loading of any unittest2 plugins... :-)


> JP


READ CAREFULLY. By accepting and reading this email you agree, on behalf of your employer, to release me from all obligations and waivers arising from any and all NON-NEGOTIATED agreements, licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap, confidentiality, non-disclosure, non-compete and acceptable use policies (”BOGUS AGREEMENTS”) that I have entered into with your employer, its partners, licensors, agents and assigns, in perpetuity, without prejudice to my ongoing rights and privileges. You further represent that you have the authority to release me from any BOGUS AGREEMENTS on behalf of your employer.

More information about the testing-in-python mailing list