Spaces:
Runtime error
Runtime error
| """Coverage anchor for LCEL invoke helpers.""" | |
| from __future__ import annotations | |
| import pytest | |
| from app.llm.lcel_invoke import invoke_lcel_chain | |
| async def test_invoke_lcel_chain_mock_chain() -> None: | |
| class _Chain: | |
| async def ainvoke(self, variables: dict) -> str: | |
| return f"ok:{variables.get('x')}" | |
| def invoke(self, variables: dict) -> str: | |
| return f"sync:{variables.get('x')}" | |
| out = await invoke_lcel_chain(_Chain(), {"x": "1"}, phase="test") | |
| assert "ok:1" in out or "sync:1" in out | |