test(fc-commands): cover accel-cal cancel and SCALED_IMU helpers - #1834
test(fc-commands): cover accel-cal cancel and SCALED_IMU helpers#1834iacker wants to merge 1 commit into
Conversation
Add hardware-free BDD tests for three previously-uncovered FlightControllerCommands methods introduced on the RC_Calibration branch: - cancel_accel_calibration: verifies the all-zero PREFLIGHT_CALIBRATION abort command, vehicle-position reset, no-connection guard, and send-exception handling. - poll_scaled_imu: verifies the (xacc, yacc, zacc) float triple, the no-message and no-connection None paths, and exception swallowing. - request_scaled_imu_messages: verifies the ACK success path, that the requested interval is forwarded, and the no-connection guard. All mocked via the shared mock_connected_master fixture; no flight controller required.
|
Heads-up on the red CI: none of the failures come from this PR. All failing tests are in the frontend tkinter files that already exist on the My change only appends to Once the WIP frontend on |
|
Yes, I did refactor some files and that broke some of the tests. I`ll fix that. Thanks for adding these tests. |
Following up on the RCCalibrationDataModel test suite, this adds hardware-free tests for three
FlightControllerCommandsmethods added on theRC_Calibrationbranch (#1816) that currently have zero coverage:cancel_accel_calibrationPREFLIGHT_CALIBRATIONabort command, vehicle-position reset, no-connection guard, send-exception handlingpoll_scaled_imu(xacc, yacc, zacc)float triple, no-message →None, no-connection →None, exception swallowed →Nonerequest_scaled_imu_messagesWhy
#1816is flagged as WIP that "needs a lot more testing". These three backend methods are pure command/telemetry logic, so they can be fully exercised with the existingmock_connected_masterfixture — no flight controller or SITL needed. This locks in their behaviour (especially the graceful-failure paths) while the RC calibration feature keeps evolving.Validation
test_backend_flightcontroller_commands.pysuite: 63 passedruff checkclean on the modified filemock_connected_masterfixture; no new fixtures or dependenciesBased on
RC_Calibrationso it merges cleanly alongside the WIP. Happy to rebase if the branch moves./kind cleanup