@@ -33,6 +33,64 @@ def test_flight_animations_run_off_screen(flight_calisto):
3333 assert rotation_result is None
3434
3535
36+ def test_flight_animations_render_all_scene_options (flight_calisto ):
37+ """Exercise the animation scene builders with the full set of overlays.
38+
39+ Rendering off screen with playback controls, charts, camera tracking and
40+ stability markers enabled covers the scene-construction branches of both
41+ ``animate_trajectory`` and ``animate_rotate`` (and the playback-control
42+ setup in ``_run_animation``) that the minimal smoke test does not reach.
43+ """
44+ pytest .importorskip ("pyvista" )
45+ shared_options = {
46+ "start" : 0 ,
47+ "stop" : None , # spans the whole flight, hitting every event marker
48+ "time_step" : 2.0 ,
49+ "backend" : "none" ,
50+ "off_screen" : True ,
51+ "window_size" : (240 , 180 ),
52+ "playback_controls" : True ,
53+ }
54+
55+ trajectory_result = flight_calisto .plots .animate_trajectory (
56+ ** shared_options ,
57+ color_by = "mach" ,
58+ show_kinematic_plots = True ,
59+ show_subrocket_point = True ,
60+ camera_mode = "follow" ,
61+ )
62+ rotation_result = flight_calisto .plots .animate_rotate (
63+ ** shared_options ,
64+ show_attitude_plots = True ,
65+ show_cp_cm = True ,
66+ camera_mode = "body" ,
67+ )
68+
69+ assert trajectory_result is None
70+ assert rotation_result is None
71+
72+
73+ def test_flight_animation_export_gif (flight_calisto , tmp_path ):
74+ """Cover the deterministic GIF export path of ``_run_animation``."""
75+ pytest .importorskip ("pyvista" )
76+ pytest .importorskip ("imageio" )
77+ export_file = tmp_path / "trajectory.gif"
78+
79+ result = flight_calisto .plots .animate_trajectory (
80+ start = 0 ,
81+ stop = 0.3 ,
82+ time_step = 0.1 ,
83+ backend = "none" ,
84+ window_size = (240 , 180 ),
85+ color_by = "speed" ,
86+ export_file = str (export_file ),
87+ )
88+
89+ assert result == str (export_file )
90+ assert export_file .is_file ()
91+ assert export_file .stat ().st_size > 0
92+
93+
3694@patch ("matplotlib.pyplot.show" )
3795def test_compare (mock_show , flight_calisto ):
3896 """Here we want to test the 'x_attributes' argument, which is the only one
0 commit comments