Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correct #2501 #2504

Merged
merged 5 commits into from
Dec 14, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
custom_msg.
  • Loading branch information
janiversen committed Dec 14, 2024
commit 03ad9a13a9371aa265f40f185c0d402f27b8f662
6 changes: 3 additions & 3 deletions examples/client_custom_msg.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ async def main(host="localhost", port=5020):
# new modbus function code.
client.register(CustomModbusPDU)
slave=1
# request1 = CustomRequest(32, slave=slave)
# result = await client.execute(False, request1)
# print(result)
request1 = CustomRequest(32, slave=slave)
result = await client.execute(False, request1)
print(result)

# inherited request
request2 = Read16CoilsRequest(32, slave)
Expand Down
3 changes: 2 additions & 1 deletion test/examples/test_examples.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ async def test_custom_msg(
if use_comm != "tcp" or use_framer != "socket":
return
assert mock_server
await main_custom_client(port=use_port, host=use_host)
with pytest.raises(asyncio.CancelledError):
await main_custom_client(port=use_port, host=use_host)

async def test_payload(self, mock_clc, mock_cls):
"""Test server/client with payload."""
Expand Down