ORIONIS API REFERENCE

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 documentation

class TestingEngine(ITestingEngine): (source)

Constructor: TestingEngine(app)

View In Hierarchy

Undocumented

Method __extractTests Extract individual test cases from a test suite recursively.
Method __init__ Initialize the TestingEngine with application configuration.
Async Method __saveCache Save test results to a JSON cache file asynchronously.
Method discover Discover and filter tests using configuration parameters.
Async Method run Run the discovered test suite asynchronously.
Method setFailFast Set the fail-fast behavior for the testing engine.
Method setFilePattern Set the file pattern for test file discovery.
Method setMethodPattern Set the method pattern for test method discovery.
Method setStartDir Set the start directory for test discovery.
Method setVerbosity Set the verbosity level for the testing engine.
Method withoutPanel Disable the start panel display for the testing engine.
Instance Variable __base_path Undocumented
Instance Variable __cache_folder Undocumented
Instance Variable __fail_fast Undocumented
Instance Variable __file_pattern Undocumented
Instance Variable __json_cache Undocumented
Instance Variable __method_pattern Undocumented
Instance Variable __start_dir Undocumented
Instance Variable __verbosity Undocumented
Instance Variable __with_panel Undocumented
def __extractTests(self, test_suite: unittest.TestSuite) -> Generator[unittest.TestCase]: (source)

Extract individual test cases from a test suite recursively.

Parameters
test_suite:unittest.TestSuiteTest suite to extract test cases from.
Returns
Generator[unittest.TestCase, None, None]Generator yielding individual test cases.
def __init__(self, app: IApplication): (source)

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:IApplicationApplication instance providing configuration values.
Returns
NoneThis method does not return a value.
async def __saveCache(self, results: list[TestResult]): (source)

Save test results to a JSON cache file asynchronously.

Parameters
results:list[TestResult]List of test results to save.
Returns
NoneThis method does not return a value.
def discover(self) -> unittest.TestSuite: (source)

Discover and filter tests using configuration parameters.

Returns
unittest.TestSuiteTest suite containing filtered test cases.
Raises
ExceptionIf a test module raises an exception outside loader error handling.
async def run(self) -> list[TestResult]: (source)

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[TestResult]List of TestResult objects containing test execution outcomes.
def setFailFast(self, *, fail_fast: bool) -> Self: (source)

Set the fail-fast behavior for the testing engine.

Parameters
fail_fast:boolWhether to stop on first failure.
Returns
SelfReturns self for method chaining.
def setFilePattern(self, file_pattern: str) -> Self: (source)

Set the file pattern for test file discovery.

Parameters
file_pattern:strPattern to match test files.
Returns
SelfReturns self for method chaining.
def setMethodPattern(self, method_pattern: str) -> Self: (source)

Set the method pattern for test method discovery.

Parameters
method_pattern:strPattern to match test methods.
Returns
SelfReturns self for method chaining.
def setStartDir(self, start_dir: str) -> Self: (source)

Set the start directory for test discovery.

Parameters
start_dir:strDirectory to start test discovery from.
Returns
SelfReturns self for method chaining.
def setVerbosity(self, verbosity: int) -> Self: (source)

Set the verbosity level for the testing engine.

Parameters
verbosity:intVerbosity level to set.
Returns
SelfReturns self for method chaining.
def withoutPanel(self) -> Self: (source)

Disable the start panel display for the testing engine.

Returns
SelfReturns self for method chaining.
__base_path: Path = (source)

Undocumented

__cache_folder: Path = (source)

Undocumented

__fail_fast: bool = (source)

Undocumented

__file_pattern: str = (source)

Undocumented

__json_cache: bool = (source)

Undocumented

__method_pattern: str = (source)

Undocumented

__start_dir: str = (source)

Undocumented

__verbosity: int = (source)

Undocumented

__with_panel: bool = (source)

Undocumented