test_spinningBodyNDOFResetChecks

Regression tests for issues #1534 and #571: state-effector configuration validation.

When its spacecraft registers states, SpinningBodyNDOFStateEffector validates that each attached body’s dcm_S0P is a proper rotation and each ISPntSc_S is a symmetric, positive-definite inertia tensor. These tests break exactly one precondition at a time and assert initialization raises a BasiliskError. (sHat_S is validated by its own setter.)

Command-array tests exercise the payload capacity during reset, spacecraft initialization, and input processing, including the last valid array entry.

test_spinningBodyNDOFResetChecks.test_command_array_capacity_validation(validation_path, extra_bodies, inputs, written)[source]

Reject oversized chains only when an array input is linked, even if unwritten.

test_spinningBodyNDOFResetChecks.test_command_array_last_entry(lock_last)[source]

The final valid torque and lock entries control the final body’s motion.

test_spinningBodyNDOFResetChecks.test_command_array_linked_after_initialization(inputs, written)[source]

Reject an oversized array subscription added after configuration validation.

test_spinningBodyNDOFResetChecks.test_spinningBodyNDOF_rejectsEmptyChain(validationPath)[source]

Attachment initialization and direct Reset() must reject an empty body chain.

test_spinningBodyNDOFResetChecks.test_spinningBodyNDOF_rejectsInvalidConfiguration(brokenPrecondition, expectedMessage, breakIt, validationPath)[source]

Attachment initialization and direct Reset() must reject the same invalid configuration.

test_spinningBodyNDOFResetChecks.test_spinningBodyNDOF_resetAcceptsMasslessConnector()[source]

A massless connector body (mass == 0, zero inertia) followed by a massive body must initialize without error. This mirrors the branching modeling pattern.

test_spinningBodyNDOFResetChecks.test_spinningBodyNDOF_resetAcceptsValidConfig()[source]

A fully valid configuration must initialize without raising.