Public Member Functions | Public Attributes | List of all members
tests._loader.Loader Class Reference
Inheritance diagram for tests._loader.Loader:
Inheritance graph
[legend]

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ __init__()

def tests._loader.Loader.__init__ (   self)

Definition at line 39 of file _loader.py.

Member Function Documentation

◆ loadTestsFromNames()

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.

◆ visit_module()

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.

◆ walk_packages()

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.

Member Data Documentation

◆ loader

tests._loader.Loader.loader

Definition at line 41 of file _loader.py.

◆ module_matcher

tests._loader.Loader.module_matcher

Definition at line 42 of file _loader.py.

◆ suite

tests._loader.Loader.suite

Definition at line 40 of file _loader.py.


The documentation for this class was generated from the following file:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:52