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

Method test_copy_signature

tests/test_client.py:170–184  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

168 client.copy(set_default_query={}, default_query={"foo": "Bar"})
169
170 def test_copy_signature(self) -> None:
171 # ensure the same parameters that can be passed to the client are defined in the `.copy()` method
172 init_signature = inspect.signature(
173 # mypy doesn't like that we access the `__init__` property.
174 self.client.__init__, # type: ignore[misc]
175 )
176 copy_signature = inspect.signature(self.client.copy)
177 exclude_params = {"transport", "proxies", "_strict_response_validation"}
178
179 for name in init_signature.parameters.keys():
180 if name in exclude_params:
181 continue
182
183 copy_param = copy_signature.parameters.get(name)
184 assert copy_param is not None, f"copy() signature is missing the {name} param"
185
186 @pytest.mark.skipif(sys.version_info >= (3, 10), reason="fails because of a memory leak that started from 3.12")
187 def test_copy_build_request(self) -> None:

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected