diff --git a/parol6/client/sync_client.py b/parol6/client/sync_client.py index fd94e13..0febb7e 100644 --- a/parol6/client/sync_client.py +++ b/parol6/client/sync_client.py @@ -102,7 +102,7 @@ def _run(coro: Coroutine[Any, Any, T]) -> T: # A loop is running in this thread; blocking would be unsafe. raise RuntimeError( "RobotClient was used while an event loop is running.\n" - "Use AsyncRobotClient and `await` the method instead." + "Construct an AsyncRobotClient in this loop and `await` it instead." ) @@ -166,11 +166,6 @@ def __enter__(self) -> "RobotClient": def __exit__(self, exc_type, exc, tb) -> None: self.close() - @property - def async_client(self) -> AsyncRobotClient: - """Access the underlying async client if you need it.""" - return self._inner - # Expose common configuration attributes @property def host(self) -> str: diff --git a/tests/unit/test_conversions.py b/tests/unit/test_conversions.py index 28182f9..b4804f9 100644 --- a/tests/unit/test_conversions.py +++ b/tests/unit/test_conversions.py @@ -29,7 +29,7 @@ def test_pose_identity_translation(monkeypatch): result = _pose_result(mat) mock_request = AsyncMock(return_value=result) - monkeypatch.setattr(client.async_client, "_request", mock_request) + monkeypatch.setattr(client._inner, "_request", mock_request) pose_rpy = client.pose() assert pose_rpy is not None @@ -49,7 +49,7 @@ def test_pose_malformed_payload(monkeypatch): client = RobotClient() mock_request = AsyncMock(return_value=PoseResultStruct(pose=[1, 2, 3])) - monkeypatch.setattr(client.async_client, "_request", mock_request) + monkeypatch.setattr(client._inner, "_request", mock_request) pose_rpy = client.pose() assert pose_rpy is None