test_gravityNonRotatingWarning
- test_gravityNonRotatingWarning.test_pointMassDoesNotDependOnOrientation()[source]
Point-mass gravity is spherically symmetric and never depends on the body orientation (the base-class default).
- test_gravityNonRotatingWarning.test_polyhedralDependsOnOrientation()[source]
A polyhedral shape model is generally non-axisymmetric, so its field is always orientation-dependent (issue #1352). This holds independently of the loaded vertex/facet data, so the bare model must report True.
- test_gravityNonRotatingWarning.test_resetEmitsWarningForPolyhedralWithoutRotation(capfd)[source]
GravityEffector::Reset() must also emit the warning for a polyhedral body without a planet-orientation message. This is the case schaubh flagged: a polyhedral field is evaluated in the body-fixed frame and was previously falling back to non-rotating silently (issue #1352). Init-only to stay fast.
- test_gravityNonRotatingWarning.test_resetEmitsWarningForTesseralFieldWithoutRotation(capfd)[source]
GravityEffector::Reset() must actually emit the BSK_WARNING when a body whose field depends on orientation (GGM03S order 4, which retains tesseral terms) has no planet-orientation message connected. This is the user-facing alert for issue #1352, so the test fails if the warning block is removed.
The warning is read from stdout (where
bskLogwrites it). It is observable here only becausebskLogflushes warning-level output; without the flush the C runtime buffers it past pytest’s capture point.Capturing the warning also exercises the full reset path, and propagating a few steps afterwards confirms the non-rotating field still initializes and runs (it must warn, not fail).
- test_gravityNonRotatingWarning.test_resetSilentForZonalFieldWithoutRotation(capfd)[source]
A purely zonal field (GGM03S J2-only) does not depend on orientation, so Reset() must NOT warn even without a planet-orientation message. This guards against a false alarm on the common J2-only configuration (issue #1352).
- test_gravityNonRotatingWarning.test_tesseralFieldDependsOnOrientation()[source]
A spherical-harmonic field that retains order >= 1 terms varies with the body’s longitude, so it must report that it depends on the body orientation. GravityEffector::Reset() uses this to decide whether to warn about a missing planet-orientation message (issue #1352).