MCPcopy Create free account
hub / github.com/Hamlib/Hamlib / do_test_send_raw

Method do_test_send_raw

bindings/python/test_rig.py:194–208  ·  view source on GitHub ↗

rig_send_raw() tests

(self, rig)

Source from the content-addressed store, hash-verified

192
193
194 def do_test_send_raw(self, rig):
195 """rig_send_raw() tests"""
196
197 # When using the Dummy driver, rig.c replies with a copy of the data
198 test_string_1 = "test string 012\n"
199 test_string_2 = test_string_1 * 2
200 assert rig.send_raw(test_string_1) == test_string_1
201 assert rig.send_raw(test_string_2, "\n") == test_string_1
202 assert rig.send_raw(test_string_2, bytes([10])) == test_string_1
203
204 test_bytes_1 = bytes("test bytes\x00\x01\x02", "ASCII")
205 test_bytes_2 = test_bytes_1 * 2
206 assert rig.send_raw(test_bytes_1) == test_bytes_1
207 assert rig.send_raw(test_bytes_1, "s") == b"tes"
208 assert rig.send_raw(test_bytes_2, b"\x02") == test_bytes_1
209
210
211 def test_with_open(self, model, rig_file, serial_speed):

Callers 1

test_with_openMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected