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 | |
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.
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.
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.
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.
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.
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.
def tests._result.AugmentedResult.addSuccess | ( | self, | |
test | |||
) |
See unittest.TestResult.addSuccess.
Reimplemented in tests._result.TerminalResult.
Definition at line 168 of file _result.py.
def tests._result.AugmentedResult.addUnexpectedSuccess | ( | self, | |
test | |||
) |
See unittest.TestResult.addUnexpectedSuccess.
Reimplemented in tests._result.TerminalResult.
Definition at line 189 of file _result.py.
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.
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.
def tests._result.AugmentedResult.startTest | ( | self, | |
test | |||
) |
See unittest.TestResult.startTest.
Reimplemented in tests._result.CoverageResult.
Definition at line 146 of file _result.py.
def tests._result.AugmentedResult.startTestRun | ( | self | ) |
See unittest.TestResult.startTestRun.
Reimplemented in tests._result.TerminalResult.
Definition at line 141 of file _result.py.
tests._result.AugmentedResult.cases |
Definition at line 139 of file _result.py.
tests._result.AugmentedResult.id_map |
Definition at line 138 of file _result.py.