From a380d70ac74bd458d283c5664527162e51e9807e Mon Sep 17 00:00:00 2001 From: "Xiang (Sean) Zhou" Date: Sat, 24 May 2025 00:09:57 -0700 Subject: [PATCH] chore: fix cli UT PiperOrigin-RevId: 762734348 --- tests/unittests/cli/utils/test_cli.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/unittests/cli/utils/test_cli.py b/tests/unittests/cli/utils/test_cli.py index a9b4284..d79e199 100644 --- a/tests/unittests/cli/utils/test_cli.py +++ b/tests/unittests/cli/utils/test_cli.py @@ -80,6 +80,9 @@ def _patch_types_and_runner(monkeypatch: pytest.MonkeyPatch) -> None: response = _Content("assistant", [_Part(f"echo:{text}")]) yield types.SimpleNamespace(author="assistant", content=response) + async def close(self, *a: Any, **k: Any) -> None: + ... + monkeypatch.setattr(cli, "Runner", _FakeRunner)