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

Public Member Functions

def __init__ (self, id_map)
 
def addError (self, test, err)
 
def addExpectedFailure (self, test, err)
 
def addFailure (self, test, err)
 
def addSkip (self, test, reason)
 
def addSuccess (self, test)
 
def addUnexpectedSuccess (self, test)
 
def augmented_results (self, filter)
 
def set_output (self, test, stdout, stderr)
 
def startTest (self, test)
 
def startTestRun (self)
 

Public Attributes

 cases
 
 id_map
 

Detailed Description

unittest.Result that keeps track of additional information.

  Uses CaseResult objects to store test-case results, providing additional
  information beyond that of the standard Python unittest library, such as
  standard output.

  Attributes:
id_map (callable): A unary callable mapping unittest.TestCase objects to
  unique identifiers.
cases (dict): A dictionary mapping from the identifiers returned by id_map
  to CaseResult objects corresponding to those IDs.

Definition at line 118 of file _result.py.

Constructor & Destructor Documentation

◆ __init__()

def tests._result.AugmentedResult.__init__ (   self,
  id_map 
)
Initialize the object with an identifier mapping.

    Arguments:
      id_map (callable): Corresponds to the attribute `id_map`.

Reimplemented in tests._result.CoverageResult.

Definition at line 132 of file _result.py.

Member Function Documentation

◆ addError()

def tests._result.AugmentedResult.addError (   self,
  test,
  err 
)
See unittest.TestResult.addError.

Reimplemented in tests._result.TerminalResult.

Definition at line 154 of file _result.py.

◆ addExpectedFailure()

def tests._result.AugmentedResult.addExpectedFailure (   self,
  test,
  err 
)
See unittest.TestResult.addExpectedFailure.

Reimplemented in tests._result.TerminalResult.

Definition at line 182 of file _result.py.

◆ addFailure()

def tests._result.AugmentedResult.addFailure (   self,
  test,
  err 
)
See unittest.TestResult.addFailure.

Reimplemented in tests._result.TerminalResult.

Definition at line 161 of file _result.py.

◆ addSkip()

def tests._result.AugmentedResult.addSkip (   self,
  test,
  reason 
)
See unittest.TestResult.addSkip.

Reimplemented in tests._result.TerminalResult.

Definition at line 175 of file _result.py.

◆ addSuccess()

def tests._result.AugmentedResult.addSuccess (   self,
  test 
)
See unittest.TestResult.addSuccess.

Reimplemented in tests._result.TerminalResult.

Definition at line 168 of file _result.py.

◆ addUnexpectedSuccess()

def tests._result.AugmentedResult.addUnexpectedSuccess (   self,
  test 
)
See unittest.TestResult.addUnexpectedSuccess.

Reimplemented in tests._result.TerminalResult.

Definition at line 189 of file _result.py.

◆ augmented_results()

def tests._result.AugmentedResult.augmented_results (   self,
  filter 
)
Convenience method to retrieve filtered case results.

    Args:
      filter (callable): A unary predicate to filter over CaseResult objects.

Definition at line 208 of file _result.py.

◆ set_output()

def tests._result.AugmentedResult.set_output (   self,
  test,
  stdout,
  stderr 
)
Set the output attributes for the CaseResult corresponding to a test.

    Args:
      test (unittest.TestCase): The TestCase to set the outputs of.
      stdout (str): Output from stdout to assign to self.id_map(test).
      stderr (str): Output from stderr to assign to self.id_map(test).

Definition at line 196 of file _result.py.

◆ startTest()

def tests._result.AugmentedResult.startTest (   self,
  test 
)
See unittest.TestResult.startTest.

Reimplemented in tests._result.CoverageResult.

Definition at line 146 of file _result.py.

◆ startTestRun()

def tests._result.AugmentedResult.startTestRun (   self)
See unittest.TestResult.startTestRun.

Reimplemented in tests._result.TerminalResult.

Definition at line 141 of file _result.py.

Member Data Documentation

◆ cases

tests._result.AugmentedResult.cases

Definition at line 139 of file _result.py.

◆ id_map

tests._result.AugmentedResult.id_map

Definition at line 138 of file _result.py.


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


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