mirror of
https://github.com/hanzoai/python-sdk.git
synced 2026-10-23 20:23:00 +00:00
- Remove all unconditional pytest.skip() calls - Fix file content tests to handle both strict/non-strict modes - Fix missing device_capabilities module in hanzo-network - Fix HanzoNetProvider imports and exports - Fix local_llm.py import errors - Create test helper classes for pagination tests - Fix FastMCP paginator test constructor args - Configure all API keys from ~/.zsh/after.zsh - All tests now pass or skip conditionally based on actual requirements
27 lines
712 B
Python
27 lines
712 B
Python
import operator
|
|
from typing import Any
|
|
from typing_extensions import override
|
|
|
|
from hanzoai._utils import LazyProxy
|
|
|
|
|
|
class RecursiveLazyProxy(LazyProxy[Any]):
|
|
@override
|
|
def __load__(self) -> Any:
|
|
return self
|
|
|
|
def __call__(self, *_args: Any, **_kwds: Any) -> Any:
|
|
raise RuntimeError("This should never be called!")
|
|
|
|
|
|
def test_recursive_proxy() -> None:
|
|
proxy = RecursiveLazyProxy()
|
|
assert repr(proxy) == "RecursiveLazyProxy"
|
|
assert str(proxy) == "RecursiveLazyProxy"
|
|
assert dir(proxy) == []
|
|
assert type(proxy).__name__ == "RecursiveLazyProxy"
|
|
assert (
|
|
type(operator.attrgetter("name.foo.bar.baz")(proxy)).__name__
|
|
== "RecursiveLazyProxy"
|
|
)
|