TestProgram that enables plugins.
Accepts the same parameters as unittest.TestProgram, but most of them are ignored as their functions are handled by plugins.
Parameters: |
|
---|
The class to instantiate to create a test run configuration session. Default: nose2.session.Session
The class to instantiate to create a test loader. Default: nose2.loader.PluggableTestLoader.
Warning
Overriding this attribute is the only way to customize the test loader class. Passing a test loader to __init__ does not work.
The class to instantiate to create a test runner. Default: nose2.runner.PluggableTestRunner.
Warning
Overriding this attribute is the only way to customize the test runner class. Passing a test runner to __init__ does not work.
List of default plugin modules to load.
Handle further arguments.
Handle arguments parsed out of command line after plugins have been loaded (and injected their argument configuration).
Handle initial arguments.
Handle the initial, pre-plugin arguments parsed out of the command line.
Load available plugins
self.defaultPlugins and self.excludePlugins are passed to the session to alter the list of plugins that will be loaded.
This method also registers any (hook, plugin) pairs set in self.hooks. This is a good way to inject plugins that fall outside of the normal loading procedure, for example, plugins that need some runtime information that can’t easily be passed to them through the configuration system.
alias of PluggableTestLoader
Parse command line args
Parses arguments and creates a configuration session, then calls createTests.
alias of PluggableTestRunner
alias of Session
Main entry point for test discovery.
Running discover calls nose2.main.PluggableTestProgram, passing through all arguments and keyword arguments except module: module is discarded, to force test discovery.
alias of PluggableTestProgram