from __future__ import annotations from pathlib import Path from knoe.ops.context import KnoeContext def test_knoe_context_construction(tmp_path: Path): ctx = KnoeContext( project_root=tmp_path, cfg_path=None, mode="dev", namespace="ns", service_namespace="svc", env={"HELLO": "world"}, logger=lambda _: None, err_logger=lambda _: None, ) assert ctx.project_root == tmp_path assert ctx.cfg_path is None assert ctx.mode == "dev" assert ctx.namespace == "ns" assert ctx.service_namespace == "svc" assert ctx.env["HELLO"] == "world"