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):
115115 task = ModbusSimulatorServer (** cmd_args )
116116 await task .run_forever ()
117117
118+ def main (): # pragma: no cover
119+ """Run simulator."""
120+ asyncio .run (run_main (), debug = True )
121+
118122if __name__ == "__main__" :
119123 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):
9999 """Test setting values against a remote device context."""
100100 client = mock .MagicMock ()
101101 context = RemoteDeviceContext (client )
102- with pytest .raises (ValueError , match = "setValues*" ):
102+ with pytest .raises (ValueError , match = r "setValues*" ):
103103 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):
9797 async def test_write_force_poll (self ):
9898 """Test write with poll."""
9999 SerialTransport .force_poll = True
100- transport , protocol = await create_serial_connection (
100+ transport , _ = await create_serial_connection (
101101 asyncio .get_running_loop (), mock .Mock , "dummy"
102102 )
103103 await asyncio .sleep (0 )
You can’t perform that action at this time.
0 commit comments