Files
pyisolate/tests/test_remote_handle.py
John Pollock b73366f884 fix: CI compatibility - ruff format, Python 3.10+, bubblewrap
Drop Python 3.9, add bubblewrap to workflows, apply ruff formatting.

Was running `ruff` and not the additional `ruff-format`. Installed pre-commit hooks to prevent any future non-compliant commits.
2026-01-21 00:28:17 -06:00

32 lines
1001 B
Python

"""Tests for RemoteObjectHandle proxy pattern.
These tests verify the RemoteObjectHandle behavior without RPC.
"""
from pyisolate._internal.remote_handle import RemoteObjectHandle
class TestRemoteObjectHandleContract:
"""Tests for RemoteObjectHandle proxy pattern."""
def test_remote_handle_stores_id(self):
"""RemoteObjectHandle stores object ID."""
handle = RemoteObjectHandle("model_123", "ModelType")
assert handle.object_id == "model_123"
def test_remote_handle_stores_type_name(self):
"""RemoteObjectHandle stores type name."""
handle = RemoteObjectHandle("model_123", "ModelType")
assert handle.type_name == "ModelType"
def test_remote_handle_repr(self):
"""RemoteObjectHandle has informative repr."""
handle = RemoteObjectHandle("my_object", "MyClass")
repr_str = repr(handle)
assert "RemoteObject" in repr_str
assert "my_object" in repr_str
assert "MyClass" in repr_str