THE ORIONIS API
Build with clarity.
Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.
class TestResultProcessor(unittest.TestResult): (source)
Constructor: TestResultProcessor(stream, descriptions, verbosity, **kwargs)
Undocumented
| Method | __create |
Create and return a TestResult instance for the given test. |
| Method | __extract |
Extract formatted traceback and highlighted source lines for a test failure. |
| Method | __init__ |
Initialize the TestResultProcessor instance. |
| Method | __print |
Print the result of a test that did not fail. |
| Method | add |
Record an errored test result and print it. |
| Method | add |
Report an expected failure as a skipped outcome. |
| Method | add |
Record a failed test result and print it. |
| Method | add |
Record a skipped test result and print it. |
| Method | add |
Record a failed subtest in both native and exported results. |
| Method | add |
Record a successful test result and print it. |
| Method | add |
Report an unexpected success as a failed outcome. |
| Method | get |
Retrieve the list of test results collected during execution. |
| Method | start |
Start timing for a test case execution. |
| Instance Variable | __console |
Undocumented |
| Instance Variable | __max |
Undocumented |
| Instance Variable | __print |
Undocumented |
| Instance Variable | __start |
Undocumented |
| Instance Variable | __test |
Undocumented |
unittest.case.TestCase, status: TestStatus, exc_info: tuple[ type[ BaseException], BaseException, object] | None = None, *, subtest: unittest.case.TestCase | None = None) -> TestResult:
(source)
¶
Create and return a TestResult instance for the given test.
| Parameters | |
test:unittest.case.TestCase | The test case instance being processed. |
status:TestStatus | The status of the test (e.g., PASSED, FAILED). |
exctuple[type[BaseException], BaseException, object] or None, optional | Exception info tuple as returned by sys.exc_info(), by default None. |
subtest:unittest.case.TestCase or None, optional | Subtest whose identity replaces the parent identity in the report. |
| Returns | |
TestResult | The constructed TestResult object containing test outcome details. |
tuple[ type[ BaseException], BaseException, object], file_path: str | None) -> tuple[ list[ str], list[ tuple[ int, str]], int | None]:
(source)
¶
Extract formatted traceback and highlighted source lines for a test failure.
| Parameters | |
exctuple | Exception info tuple as returned by sys.exc_info(). |
filestr or None | Absolute path of the test source file used to filter stack frames. |
| Returns | |
tuple | A three-element tuple of (traceback_lines, source_code_pairs, line_no). |
object = None, descriptions: object = None, verbosity: int | None = None, **kwargs: object):
(source)
¶
Initialize the TestResultProcessor instance.
| Parameters | |
stream:object, optional | Output stream forwarded to the superclass, by default None. |
descriptions:object, optional | Description flag forwarded to the superclass, by default None. |
verbosity:int | None, optional | Detail level used to print every recorded outcome: 1 prints one compact line per test and 2 prints a detailed panel. Any other value, including None, prints nothing. Supplied by the runner through unittest.TextTestRunner._makeResult, by default None. |
**kwargs:object | Additional keyword arguments forwarded to the superclass. |
| Returns | |
None | This constructor initializes instance attributes and returns None. |
Print the result of a test that did not fail.
| Parameters | |
result:TestResult | The test result instance to display. |
| Returns | |
None | This method prints the formatted test result to the console and does not return a value. |
unittest.case.TestCase, err: tuple[ type[ BaseException], BaseException, object]):
(source)
¶
Record an errored test result and print it.
| Parameters | |
test:unittest.case.TestCase | The test case instance that errored. |
err:tuple[type[BaseException], BaseException, object] | The exception info tuple for the error. |
| Returns | |
None | This method appends the result and prints it, then calls the superclass method. |
unittest.case.TestCase, err: tuple[ type[ BaseException], BaseException, object]):
(source)
¶
unittest.case.TestCase, err: tuple[ type[ BaseException], BaseException, object]):
(source)
¶
Record a failed test result and print it.
| Parameters | |
test:unittest.case.TestCase | The test case instance that failed. |
err:tuple[type[BaseException], BaseException, object] | The exception info tuple for the failure. |
| Returns | |
None | This method appends the result and prints it, then calls the superclass method. |
unittest.case.TestCase, subtest: unittest.case.TestCase, err: tuple[ type[ BaseException], BaseException, object] | None):
(source)
¶
Record a failed subtest in both native and exported results.
| Parameters | |
test:unittest.case.TestCase | Parent test providing source and method metadata. |
subtest:unittest.case.TestCase | Subtest providing its parameterized identifier. |
err:tuple or None | Exception details, or None when the subtest passed. |
| Returns | |
None | Complete the documented operation without returning a value. |
Record a successful test result and print it.
| Parameters | |
test:unittest.case.TestCase | The test case instance that succeeded. |
| Returns | |
None | This method appends the result and prints it, then calls the superclass method. |
Report an unexpected success as a failed outcome.
| Parameters | |
test:unittest.case.TestCase | Test that passed despite its expected-failure marker. |
| Returns | |
None | Complete the documented operation without returning a value. |
Retrieve the list of test results collected during execution.
| Returns | |
list[TestResult] | A list of TestResult instances representing the outcomes of executed tests. |
Start timing for a test case execution.
| Parameters | |
test:unittest.case.TestCase | The test case instance being started. |
| Returns | |
None | This method starts a timer and calls the superclass method. |