Files

17 lines
748 B
Python

"""Test doubles for the suites that drive a chunk: the loop of an entry point that exists only in tests."""
import pathlib
import typing
from loop_effects.effects import Effects
from chunk_driver.this_loop import Loop
from loop_state import paths
from claude_code import session
from agent_cycle.doubles import WINDOW
def a_loop(effects: Effects, **fields: typing.Any) -> Loop:
"""A loop in /r on effects, with fields in place of its defaults."""
home = pathlib.Path("/h")
defaults = {"root": "/r", "session": session.session_named("A proj a-driver", home / ".claude" / "projects"), "paths": paths.paths_from(home), "env": {}, "launcher": pathlib.Path("/b/a-driver"), "window": WINDOW}
return Loop(**{**defaults, **fields}, effects=effects)