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

Method do_test_antenna

bindings/python/test_rig.py:83–96  ·  view source on GitHub ↗

Antenna tests

(self, rig)

Source from the content-addressed store, hash-verified

81
82
83 def do_test_antenna(self, rig):
84 """Antenna tests"""
85
86 # FIXME should use a RIG_ANT_* constant but they aren't available in the bindings
87 RIG_ANT_1 = 1<<0
88 RIG_ANT_UNKNOWN = 1<<30
89 RIG_ANT_CURR = 1<<31
90 option = Hamlib.value_t()
91 option.i = 0
92 expected = [RIG_ANT_UNKNOWN, RIG_ANT_UNKNOWN, RIG_ANT_1, 0]
93 assert rig.set_ant(RIG_ANT_1, option) is None
94 assert rig.get_ant(RIG_ANT_CURR) == expected
95 assert rig.set_ant(RIG_ANT_1, option, Hamlib.RIG_VFO_CURR) is None
96 assert rig.get_ant(RIG_ANT_CURR, Hamlib.RIG_VFO_A) == expected
97
98
99 def do_test_squelch(self, rig):

Callers 1

test_with_openMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected