MCPcopy
hub / github.com/openai/openai-python / test_copy_default_options

Method test_copy_default_options

tests/test_client.py:1422–1436  ·  tests/test_client.py::TestAsyncOpenAI.test_copy_default_options
(self, async_client: AsyncOpenAI)

Source from the content-addressed store, hash-verified

1420 assert async_client.admin_api_key == class="st">"My Admin API Key"
1421
1422 def test_copy_default_options(self, async_client: AsyncOpenAI) -> None:
1423 class="cm"># options that have a default are overridden correctly
1424 copied = async_client.copy(max_retries=7)
1425 assert copied.max_retries == 7
1426 assert async_client.max_retries == 2
1427
1428 copied2 = copied.copy(max_retries=6)
1429 assert copied2.max_retries == 6
1430 assert copied.max_retries == 7
1431
1432 class="cm"># timeout
1433 assert isinstance(async_client.timeout, httpx.Timeout)
1434 copied = async_client.copy(timeout=None)
1435 assert copied.timeout is None
1436 assert isinstance(async_client.timeout, httpx.Timeout)
1437
1438 async def test_copy_default_headers(self) -> None:
1439 client = AsyncOpenAI(

Callers

nothing calls this directly

Calls 1

copyMethod · 0.45

Tested by

no test coverage detected