@@ -67,48 +67,48 @@ async def start_async_test(client):
6767 _logger .debug ("Write to a Coil and read back" )
6868 rq = await client .write_coil (0 , True , unit = UNIT )
6969 rr = await client .read_coils (0 , 1 , unit = UNIT )
70- assert rq .function_code < 0x80 # test that we are not an error
71- assert rr .bits [0 ] # test the expected value
70+ assert rq .function_code < 0x80 #nosec test that we are not an error
71+ assert rr .bits [0 ] #nosec test the expected value
7272
7373 _logger .debug ("Write to multiple coils and read back- test 1" )
7474 rq = await client .write_coils (1 , [True ] * 8 , unit = UNIT )
75- assert rq .function_code < 0x80 # test that we are not an error
75+ assert rq .function_code < 0x80 #nosec test that we are not an error
7676 rr = await client .read_coils (1 , 21 , unit = UNIT )
77- assert rr .function_code < 0x80 # test that we are not an error
77+ assert rr .function_code < 0x80 #nosec test that we are not an error
7878 resp = [True ] * 21
7979
8080 # If the returned output quantity is not a multiple of eight,
8181 # the remaining bits in the final data byte will be padded with zeros
8282 # (toward the high order end of the byte).
8383
8484 resp .extend ([False ] * 3 )
85- assert rr .bits == resp # test the expected value
85+ assert rr .bits == resp #nosec test the expected value
8686
8787 _logger .debug ("Write to multiple coils and read back - test 2" )
8888 rq = await client .write_coils (1 , [False ] * 8 , unit = UNIT )
8989 rr = await client .read_coils (1 , 8 , unit = UNIT )
90- assert rq .function_code < 0x80 # test that we are not an error
91- assert rr .bits == [False ] * 8 # test the expected value
90+ assert rq .function_code < 0x80 #nosec test that we are not an error
91+ assert rr .bits == [False ] * 8 #nosec test the expected value
9292
9393 _logger .debug ("Read discrete inputs" )
9494 rr = await client .read_discrete_inputs (0 , 8 , unit = UNIT )
95- assert rq .function_code < 0x80 # test that we are not an error
95+ assert rq .function_code < 0x80 #nosec test that we are not an error
9696
9797 _logger .debug ("Write to a holding register and read back" )
9898 rq = await client .write_register (1 , 10 , unit = UNIT )
9999 rr = await client .read_holding_registers (1 , 1 , unit = UNIT )
100- assert rq .function_code < 0x80 # test that we are not an error
101- assert rr .registers [0 ] == 10 # test the expected value
100+ assert rq .function_code < 0x80 #nosec test that we are not an error
101+ assert rr .registers [0 ] == 10 #nosec test the expected value
102102
103103 _logger .debug ("Write to multiple holding registers and read back" )
104104 rq = await client .write_registers (1 , [10 ] * 8 , unit = UNIT )
105105 rr = await client .read_holding_registers (1 , 8 , unit = UNIT )
106- assert rq .function_code < 0x80 # test that we are not an error
107- assert rr .registers == [10 ] * 8 # test the expected value
106+ assert rq .function_code < 0x80 #nosec test that we are not an error
107+ assert rr .registers == [10 ] * 8 #nosec test the expected value
108108
109109 _logger .debug ("Read input registers" )
110110 rr = await client .read_input_registers (1 , 8 , unit = UNIT )
111- assert rq .function_code < 0x80 # test that we are not an error
111+ assert rq .function_code < 0x80 #nosec test that we are not an error
112112
113113 arguments = {
114114 'read_address' : 1 ,
@@ -119,9 +119,9 @@ async def start_async_test(client):
119119 _logger .debug ("Read write registers simultaneously" )
120120 rq = await client .readwrite_registers (unit = UNIT , ** arguments )
121121 rr = await client .read_holding_registers (1 , 8 , unit = UNIT )
122- assert rq .function_code < 0x80 # test that we are not an error
123- assert rq .registers == [20 ] * 8 # test the expected value
124- assert rr .registers == [20 ] * 8 # test the expected value
122+ assert rq .function_code < 0x80 #nosec test that we are not an error
123+ assert rq .registers == [20 ] * 8 #nosec test the expected value
124+ assert rr .registers == [20 ] * 8 #nosec test the expected value
125125 await asyncio .sleep (1 )
126126
127127
@@ -130,7 +130,7 @@ def run_with_not_running_loop():
130130 _logger .debug ("Running Async client with asyncio loop not yet started" )
131131 _logger .debug ("------------------------------------------------------" )
132132 loop = asyncio .new_event_loop ()
133- assert not loop .is_running ()
133+ assert not loop .is_running () #nosec
134134 asyncio .set_event_loop (loop )
135135 new_loop , client = ModbusClient (schedulers .ASYNC_IO , port = 5020 , loop = loop ) #NOSONAR pylint: disable=unpacking-non-sequence
136136 loop .run_until_complete (start_async_test (client .protocol ))
@@ -162,7 +162,7 @@ def start_loop(loop):
162162 # Start the loop
163163 mythread .start ()
164164 asyncio .sleep (1 )
165- assert loop .is_running ()
165+ assert loop .is_running () #nosec
166166 asyncio .set_event_loop (loop )
167167 loop , client = ModbusClient (schedulers .ASYNC_IO , port = 5020 , loop = loop ) #NOSONAR pylint: disable=unpacking-non-sequence
168168 future = asyncio .run_coroutine_threadsafe (
0 commit comments