Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions parol6/client/sync_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."
)


Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_conversions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Loading