File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed
pymodbus/server/simulator Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -115,5 +115,9 @@ async def run_main(cmdline=None):
115
115
task = ModbusSimulatorServer (** cmd_args )
116
116
await task .run_forever ()
117
117
118
+ def main (): # pragma: no cover
119
+ """Run simulator."""
120
+ asyncio .run (run_main (), debug = True )
121
+
118
122
if __name__ == "__main__" :
119
123
asyncio .run (run_main (), debug = True )
Original file line number Diff line number Diff line change @@ -99,5 +99,5 @@ def test_remote_device_set_values_wrong(self):
99
99
"""Test setting values against a remote device context."""
100
100
client = mock .MagicMock ()
101
101
context = RemoteDeviceContext (client )
102
- with pytest .raises (ValueError , match = "setValues*" ):
102
+ with pytest .raises (ValueError , match = r "setValues*" ):
103
103
context .setValues (0x01 , 0 , [1 ])
Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ async def test_force_poll(self):
97
97
async def test_write_force_poll (self ):
98
98
"""Test write with poll."""
99
99
SerialTransport .force_poll = True
100
- transport , protocol = await create_serial_connection (
100
+ transport , _ = await create_serial_connection (
101
101
asyncio .get_running_loop (), mock .Mock , "dummy"
102
102
)
103
103
await asyncio .sleep (0 )
You can’t perform that action at this time.
0 commit comments