(self, spans: Spans, respx_mock: MockRouter)
| 1040 | |
| 1041 | @pytest.mark.respx(base_url=base_url) |
| 1042 | def test_timeout(self, spans: Spans, respx_mock: MockRouter) -> None: |
| 1043 | respx_mock.post("/v1/messages").mock(side_effect=httpx2.ReadTimeout("timeout")) |
| 1044 | client = make_client(spans, max_retries=0) |
| 1045 | |
| 1046 | with pytest.raises(APITimeoutError): |
| 1047 | create(client) |
| 1048 | |
| 1049 | assert attributes(spans.one("anthropic.messages.create"))["error.type"] == "client_timeout_error" |
| 1050 | |
| 1051 | @pytest.mark.respx(base_url=base_url) |
| 1052 | def test_a_retried_call_has_one_span(self, spans: Spans, respx_mock: MockRouter) -> None: |
nothing calls this directly
no test coverage detected