Loader: Test Functions
Load tests from test functions in modules.
This plugin responds to loadTestsFromModule() by adding test
cases for all test functions in the module to event.extraTests. It
uses session.testMethodPrefix to find test functions.
Functions that are generators, have param lists, or take arguments
are not collected.
This plugin also implements loadTestsFromName() to enable loading
tests from dotted function names passed on the command line.
Configuration [functions]
-
always-on
Default : | True |
Type : | boolean |
Sample configuration
The default configuration is equivalent to including the following in a unittest.cfg file.
[functions]
always-on = True
Plugin class reference: Functions
-
class nose2.plugins.loader.functions.Functions[source]
Loader plugin that loads test functions
-
loadTestsFromModule(event)[source]
Load test functions from event.module
-
loadTestsFromName(event)[source]
Load test if event.name is the name of a test function