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.
Discover configured tests, execute them and persist optional result caches.
| Method | __extract |
Extract individual test cases from a test suite recursively. |
| Method | __init__ |
Initialize the TestingEngine with application configuration. |
| Method | __save |
Save test results to an independent JSON cache file. |
| Method | __test |
Yield matching Python files without traversing an explicit file path. |
| Method | discover |
Discover and filter tests using configuration parameters. |
| Async Method | run |
Run the discovered test suite asynchronously. |
| Method | set |
Set the fail-fast behavior for the testing engine. |
| Method | set |
Set the file pattern for test file discovery. |
| Method | set |
Set the method pattern for test method discovery. |
| Method | set |
Set the directory or Python file used for test discovery. |
| Method | set |
Set the verbosity level for the testing engine. |
| Method | without |
Disable the start panel display for the testing engine. |
| Instance Variable | __base |
Retrieve configuration values from the application instance. |
| Instance Variable | __cache |
Directory used to persist structured test-run results. |
| Instance Variable | __fail |
Whether the test run stops after the first failure. |
| Instance Variable | __file |
Filename pattern selecting modules for test discovery. |
| Instance Variable | __json |
Json cache produced by bool. |
| Instance Variable | __method |
Method-name pattern selecting test cases. |
| Instance Variable | __start |
Directory from which test discovery begins. |
| Instance Variable | __verbosity |
Configured detail level for test-runner output. |
| Instance Variable | __with |
With panel flag used by TestingEngine. |
unittest.TestSuite) -> Generator[ unittest.TestCase]:
(source)
¶
Extract individual test cases from a test suite recursively.
| Parameters | |
testunittest.TestSuite | Test suite to extract test cases from. |
| Yields | |
unittest.TestCase | Individual test case contained in the suite. |
Initialize the TestingEngine with application configuration.
Every testing.* key that is absent from the application configuration resolves to None and is replaced by the default declared in orionis.foundation.config.testing.Testing, so discovery never receives a missing value.
| Parameters | |
app:orionis.IApplication | Application instance providing configuration values. |
| Returns | |
None | This method does not return a value. |
Save test results to an independent JSON cache file.
| Parameters | |
results:list[orionis.test.entities.result.TestResult] | List of test results to save. |
| Returns | |
None | This method does not return a value. |
Yield matching Python files without traversing an explicit file path.
| Parameters | |
startpathlib.Path | Existing directory or Python file selected for discovery. |
| Yields | |
pathlib.Path | File to import as a test module. |
| Raises | |
ValueError | If an explicitly selected file does not have a Python extension. |
OSError | If the discovery tree cannot be read. |
Discover and filter tests using configuration parameters.
| Returns | |
unittest.TestSuite | Test suite containing filtered test cases. |
| Raises | |
OSError | If the selected path is absent or a directory cannot be read. |
ValueError | If the selected path is outside the application or is not Python. |
ImportError | If a matching module was imported from another project directory. |
Exception | If a test module raises an exception outside loader error handling. |
Run the discovered test suite asynchronously.
Discovers the tests, builds a runner carrying the configured verbosity, and executes them using a thread pool to avoid blocking. Saves results to cache if enabled.
| Returns | |
list[orionis.test.entities.result.TestResult] | List of TestResult objects containing test execution outcomes. |
Set the fail-fast behavior for the testing engine.
| Parameters | |
failbool | Whether to stop on first failure. |
| Returns | |
typing.Self | Returns self for method chaining. |
Set the file pattern for test file discovery.
| Parameters | |
filestr | Pattern to match test files. |
| Returns | |
typing.Self | Returns self for method chaining. |
Set the method pattern for test method discovery.
| Parameters | |
methodstr | Pattern to match test methods. |
| Returns | |
typing.Self | Returns self for method chaining. |
Set the directory or Python file used for test discovery.
| Parameters | |
startstr | Directory or Python file, relative to the application root when not absolute. |
| Returns | |
typing.Self | Returns self for method chaining. |
Set the verbosity level for the testing engine.
| Parameters | |
verbosity:int | Verbosity level to set. |
| Returns | |
typing.Self | Returns self for method chaining. |
Disable the start panel display for the testing engine.
| Returns | |
typing.Self | Returns self for method chaining. |