ml_switcheroo.generated_tests.runtime_builder ============================================= .. py:module:: ml_switcheroo.generated_tests.runtime_builder .. autoapi-nested-parse:: Runtime Module Logic Generator. This module contains the logic to creating the `runtime.py` file required by generated tests. It injects shared helpers, cross-framework comparison logic, and determinism fixtures. Functions --------- .. autoapisummary:: ml_switcheroo.generated_tests.runtime_builder.ensure_runtime_module Module Contents --------------- .. py:function:: ensure_runtime_module(out_dir: pathlib.Path, frameworks: Optional[List[str]] = None, mgr: Any = None) -> None Creates or updates the `runtime.py` module in the output directory. Injects: 1. Safe import blocks for all used frameworks (try/except ImportError). 2. Determinism fixtures. 3. Recursive result comparison logic (`verify_results`). :param out_dir: Directory where the generated tests and runtime.py reside. :param frameworks: List of frameworks to include imports for. :param mgr: SemanticsManager for retrieving custom import templates.