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

Update check for windows platform #2247

Merged
merged 2 commits into from
Jul 20, 2024
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
1 change: 0 additions & 1 deletion test/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def test_log_parms(self, txt, result, params):

def test_apply_logging(self):
"""Test pymodbus_apply_logging_config."""

pymodbus_apply_logging_config("debug")
pymodbus_apply_logging_config(logging.NOTSET)
pymodbus_apply_logging_config("debug", "pymodbus.log")
Expand Down
5 changes: 5 additions & 0 deletions test/transport/test_comm.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ async def test_split_serial_packet(self, client, server, use_port):
)
async def test_serial_poll(self, client, server, use_port):
"""Test connection and data exchange."""
if SerialTransport.force_poll:
client.close()
server.close()
return
Log.debug("test_serial_poll {}", use_port)
assert await server.listen()
SerialTransport.force_poll = True
Expand All @@ -188,6 +192,7 @@ async def test_serial_poll(self, client, server, use_port):
assert not client.recv_buffer
client.close()
server.close()
SerialTransport.force_poll = False

@pytest.mark.parametrize(
("use_comm_type", "use_host"),
Expand Down
4 changes: 4 additions & 0 deletions test/transport/test_serial.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ async def test_create_serial(self):

async def test_force_poll(self):
"""Test external methods."""
if SerialTransport.force_poll:
return
SerialTransport.force_poll = True
transport, protocol = await create_serial_connection(
asyncio.get_running_loop(), mock.Mock, "dummy"
Expand All @@ -94,6 +96,8 @@ async def test_force_poll(self):

async def test_write_force_poll(self):
"""Test write with poll."""
if SerialTransport.force_poll:
return
SerialTransport.force_poll = True
transport, protocol = await create_serial_connection(
asyncio.get_running_loop(), mock.Mock, "dummy"
Expand Down