MCPcopy Create free account
hub / github.com/anomalyco/opencode-sdk-python / test_response_parse_bool

Function test_response_parse_bool

tests/test_response.py:204–215  ·  view source on GitHub ↗
(client: Opencode, content: str, expected: bool)

Source from the content-addressed store, hash-verified

202 ],
203)
204def test_response_parse_bool(client: Opencode, content: str, expected: bool) -> None:
205 response = APIResponse(
206 raw=httpx.Response(200, content=content),
207 client=client,
208 stream=False,
209 stream_cls=None,
210 cast_to=str,
211 options=FinalRequestOptions.construct(method="get", url="/foo"),
212 )
213
214 result = response.parse(to=bool)
215 assert result is expected
216
217
218@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 3

parseMethod · 0.95
APIResponseClass · 0.90
constructMethod · 0.45

Tested by

no test coverage detected