It makes it easier in future to conditionally run some tests(eg.
to not test PTT for receiver-only rigs), or to run tests in
isolation (after renaming them).
It makes it easier to look at failing tests because pytest prints
the code of the failing test up to the failure including any
function that called the failed test (in this case would print
everything from def test_with_open() up to the line with the
failed assert.
The function rig_init() doesn't touch the hardware, it's rig_open()
that initiates the connection and in fact the first use of comm_status
in rig_open() is when it gets the value RIG_COMM_STATUS_CONNECTING and
rig_close() sets it to RIG_COMM_STATUS_DISCONNECTED.
To execute the tests with the installed Hamlib use the same long arguments
as ampctl, eg:
bindings/python/test_amp.py --model {MODEL_NUMBER} --amp-file /dev/ttyUSB0 --serial-speed {BAUD}
To execute the tests from the build tree, add the path to the libraries
that you built, eg. from the root of the build tree:
PYTHONPATH=bindings/:bindings/.libs/ ...your command...
To execute the tests with the installed Hamlib use the same long arguments
as rotctl, eg:
bindings/python/test_rot.py --model {MODEL_NUMBER} --rot-file /dev/ttyUSB0 --serial-speed {BAUD}
To execute the tests from the build tree, add the path to the libraries
that you built, eg. from the root of the build tree:
PYTHONPATH=bindings/:bindings/.libs/ ...your command...
To execute the tests with the installed Hamlib use the same long arguments
as rigctl, eg:
bindings/python/test_rig.py --model {MODEL_NUMBER} --rig-file /dev/ttyUSB0 --serial-speed {BAUD}
To execute the tests from the build tree, add the path to the libraries
that you built, eg. from the root of the build tree:
PYTHONPATH=bindings/:bindings/.libs/ ...your command...
Fixes: set_ptt set_rit set_rptr_offs set_rptr_shift
set_split_freq set_ts set_xit vfo_op
This is also swapping the arguments to make the vfo optional
like in other methods.
Since Python 3.12, strings such as:
f"test_{object_name.replace(".", "_")}_class.py"
are allowed but older versions require single quotes around the dot and
underscore within the double quoted string.
Should quell CI error on Ubuntu Noble.