nose’s test loader implements the same basic functionality as its superclass, unittest.TestLoader, but extends it by more liberal interpretations of what may be a test and how a test may be named.
Test loader that extends unittest.TestLoader to:
Override to select with selector, unless config.getTestCaseNamesCompat is True
Load tests from the directory at path. This is a generator – each suite of tests from a module or other file is yielded and is expected to be executed before the next file is examined.
Load tests from a non-module file. Default is to raise a ValueError; plugins may implement loadTestsFromFile to provide a list of tests loaded from the file.
Lazy-load tests from a generator function. The generator function may yield either:
Lazy-load tests from a generator method.
This is more complicated than loading from a generator function, since a generator method may yield:
Load all tests from module and return a suite containing them. If the module has been discovered and is not test-like, the suite will be empty by default, though plugins may add their own tests.
Load tests from the entity with the given name.
The name may indicate a file, directory, module, or any object within a module. See nose.util.split_test_name for details on test name parsing.
Load tests from all names, returning a suite containing all tests.
Load tests from a unittest.TestCase subclass.
Load tests from a test class that is not a unittest.TestCase subclass.
In this case, we can’t depend on the class’s __init__ taking method name arguments, so we have to compose a MethodTestCase for each method in the class that looks testlike.
Given the yield value of a test generator, return a func and args.
This is used in the two loadTestsFromGenerator* methods.
Resolve name within module
alias of TestLoader