MCPcopy Create free account
hub / github.com/F-Stack/f-stack / TestCaseResult

Class TestCaseResult

dpdk/dts/framework/test_result.py:147–173  ·  view source on GitHub ↗

The test case specific result. Stores the result of the actual test case. Also stores the test case name.

Source from the content-addressed store, hash-verified

145
146
147class TestCaseResult(BaseResult, FixtureResult):
148 """
149 The test case specific result.
150 Stores the result of the actual test case.
151 Also stores the test case name.
152 """
153
154 test_case_name: str
155
156 def __init__(self, test_case_name: str):
157 super(TestCaseResult, self).__init__()
158 self.test_case_name = test_case_name
159
160 def update(self, result: Result, error: Exception | None = None) -> None:
161 self.result = result
162 self.error = error
163
164 def _get_inner_errors(self) -> list[Exception]:
165 if self.error:
166 return [self.error]
167 return []
168
169 def add_stats(self, statistics: Statistics) -> None:
170 statistics += self.result
171
172 def __bool__(self) -> bool:
173 return bool(self.setup_result) and bool(self.teardown_result) and bool(self.result)
174
175
176class TestSuiteResult(BaseResult):

Callers 1

add_test_caseMethod · 0.85

Calls

no outgoing calls

Tested by 1

add_test_caseMethod · 0.68