
Public Member Functions | |
| def | __init__ (self) |
| def | loadTestsFromNames (self, names, module=None) |
| def | visit_module (self, module) |
| def | walk_packages (self, package_paths) |
Public Attributes | |
| loader | |
| module_matcher | |
| suite | |
Test loader for setuptools test suite support. Attributes: suite (unittest.TestSuite): All tests collected by the loader. loader (unittest.TestLoader): Standard Python unittest loader to be ran per module discovered. module_matcher (re.RegexObject): A regular expression object to match against module names and determine whether or not the discovered module contributes to the test suite.
Definition at line 27 of file _loader.py.
| def tests._loader.Loader.__init__ | ( | self | ) |
Definition at line 39 of file _loader.py.
| def tests._loader.Loader.loadTestsFromNames | ( | self, | |
| names, | |||
module = None |
|||
| ) |
Function mirroring TestLoader::loadTestsFromNames, as expected by
setuptools.setup argument `test_loader`.
Definition at line 44 of file _loader.py.
| def tests._loader.Loader.visit_module | ( | self, | |
| module | |||
| ) |
Visits the module, adding discovered tests to the test suite.
Args:
module (module): Module to match against self.module_matcher; if matched
it has its tests loaded via self.loader into self.suite.
Definition at line 77 of file _loader.py.
| def tests._loader.Loader.walk_packages | ( | self, | |
| package_paths | |||
| ) |
Walks over the packages, dispatching `visit_module` calls.
Args:
package_paths (list): A list of paths over which to walk through modules
along.
Definition at line 65 of file _loader.py.
| tests._loader.Loader.loader |
Definition at line 41 of file _loader.py.
| tests._loader.Loader.module_matcher |
Definition at line 42 of file _loader.py.
| tests._loader.Loader.suite |
Definition at line 40 of file _loader.py.