(
is_recording: bool,
http_snapshot_serializer_options: SnapshotSerializerOptions,
http_snapshot: inline_snapshot.Snapshot[Any],
)
| 97 | |
| 98 | @pytest.fixture(scope="function") |
| 99 | async def async_snapshot_client( |
| 100 | is_recording: bool, |
| 101 | http_snapshot_serializer_options: SnapshotSerializerOptions, |
| 102 | http_snapshot: inline_snapshot.Snapshot[Any], |
| 103 | ) -> AsyncIterator[AsyncAnthropic]: |
| 104 | async with HttpxAsyncSnapshotClient( |
| 105 | http_snapshot, is_recording, serializer_options=http_snapshot_serializer_options |
| 106 | ) as snapshot_client: |
| 107 | client = AsyncAnthropic(http_client=snapshot_client, api_key=None if is_recording else api_key) |
| 108 | yield client |
| 109 | |
| 110 | |
| 111 | @pytest.fixture(scope="session") |
nothing calls this directly
no test coverage detected