@@ -28,7 +28,11 @@ def test_evaluation(self):
2828 nt .assert_almost_equal (spline (0 ).A , self .control_poses [0 ].A )
2929 nt .assert_almost_equal (spline (1 ).A , self .control_poses [- 1 ].A )
3030
31- @pytest .mark .skipif (os .environ .get ("CI" ) == "true" , reason = "no display in CI" )
31+ @pytest .mark .skipif (
32+ plt .get_backend ().lower () == "agg" or os .environ .get ("CI" ) == "true" ,
33+ reason = "animate=True busy-waits on a timer callback that never "
34+ "fires under the non-interactive Agg backend" ,
35+ )
3236 def test_visualize (self ):
3337 spline = BSplineSE3 (self .control_poses )
3438 spline .visualize (
@@ -69,7 +73,11 @@ def test_small_delta_t(self):
6973 np .linspace (0 , InterpSplineSE3 ._e , len (self .waypoints )), self .waypoints
7074 )
7175
72- @pytest .mark .skipif (os .environ .get ("CI" ) == "true" , reason = "no display in CI" )
76+ @pytest .mark .skipif (
77+ plt .get_backend ().lower () == "agg" or os .environ .get ("CI" ) == "true" ,
78+ reason = "animate=True busy-waits on a timer callback that never "
79+ "fires under the non-interactive Agg backend" ,
80+ )
7381 def test_visualize (self ):
7482 spline = InterpSplineSE3 (self .times , self .waypoints )
7583 spline .visualize (
@@ -110,7 +118,9 @@ def test_spline_fit(self):
110118
111119 assert fit .max_angular_error () < np .deg2rad (5.0 )
112120 assert fit .max_angular_error () < 0.1
113- if os .environ .get ("CI" ) != "true" :
121+ # animate=True busy-waits on a timer callback that never fires
122+ # under the non-interactive Agg backend
123+ if plt .get_backend ().lower () != "agg" and os .environ .get ("CI" ) != "true" :
114124 spline .visualize (
115125 sample_times = np .linspace (0 , self .time_horizon , 100 ),
116126 animate = True ,
0 commit comments