Call all the methods that depend on open()
(self, model, rig_file, serial_speed)
| 209 | |
| 210 | |
| 211 | def test_with_open(self, model, rig_file, serial_speed): |
| 212 | """Call all the methods that depend on open()""" |
| 213 | rig = Hamlib.Rig(model) |
| 214 | assert rig is not None |
| 215 | |
| 216 | assert rig.state.comm_state == 0 |
| 217 | assert rig.state.comm_status == Hamlib.RIG_COMM_STATUS_DISCONNECTED |
| 218 | assert rig.set_conf("rig_pathname", rig_file) is None |
| 219 | assert rig.set_conf("serial_speed", str(serial_speed)) is None |
| 220 | assert rig.open() is None |
| 221 | assert rig.state.comm_state == 1 |
| 222 | assert rig.state.comm_status == Hamlib.RIG_COMM_STATUS_OK |
| 223 | info = rig.get_info() |
| 224 | assert isinstance(info, str) |
| 225 | |
| 226 | self.do_test_frequency(rig) |
| 227 | self.do_test_vfo(rig) |
| 228 | self.do_test_rit_xit(rig) |
| 229 | self.do_test_antenna(rig) |
| 230 | self.do_test_squelch(rig) |
| 231 | self.do_test_callback(rig) |
| 232 | # When using the Dummy driver, rig.c replies with a copy of the data |
| 233 | if model == Hamlib.RIG_MODEL_DUMMY: |
| 234 | self.do_test_send_raw(rig) |
| 235 | |
| 236 | assert rig.close() is None |
| 237 | assert rig.state.comm_state == 0 |
| 238 | assert rig.state.comm_status == Hamlib.RIG_COMM_STATUS_DISCONNECTED |
| 239 | info = rig.get_info() |
| 240 | assert info is None |
| 241 | |
| 242 | |
| 243 | @pytest.mark.skipif('config.getoption("model") != Hamlib.RIG_MODEL_DUMMY') |
nothing calls this directly
no test coverage detected