StrategyTestHarness (testing/harness.py)

EverOS · src/everos/infra/ome/testing/harness.py · python · Apache-2.0
database

Async test harness for running offline strategy engines with a temporary SQLite DB.

# Source: https://github.com/EverMind-AI/EverOS | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
"""StrategyTestHarness — full OfflineEngine on a tmp SQLite db.

Designed for end-to-end strategy tests: register, start, emit, drain
until terminal, inspect run records. Cleans up the tmp directory on exit.
"""

from __future__ import annotations

import shutil
from pathlib import Path
from tempfile import mkdtemp
from typing import Any

from everos.infra.ome.config import OMEConfig
from everos.infra.ome.decorator import Strategy
from everos.infra.ome.engine import OfflineEngine
from everos.infra.ome.events import BaseEvent
from everos.infra.ome.records import RunRecord, RunStatus


cla

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key