Skip to content

Testing API Reference

Bases: BasePES

Replays pre-recorded PhaseOutcome objects without depending on claude_agent_sdk.

Bases: LocalWorkspaceManager

Anchor a real LocalWorkspaceManager's root under a tmp directory.

All real behaviour (fcntl locking, shutil.copytree, tar.gz archiving) is inherited from the parent class; only workspaces_root and archives_root are redirected inside tmp for test isolation.

Usage (pytest)::

@pytest.fixture
def ws_mgr(tmp_path):
    return TempWorkspaceManager(tmp_path)

Bases: TrajectoryStore

Runs the real schema against an :memory: SQLite database.

Usage::

store = FakeTrajectoryStore()
store.start_run(...)

Pre-recorded result for a single phase attempt.