|
| 1 | +import os |
| 2 | +import pytest |
| 3 | + |
1 | 4 | import numpy.testing as nt |
2 | 5 | import numpy as np |
3 | 6 | import matplotlib.pyplot as plt |
@@ -25,6 +28,7 @@ def test_evaluation(self): |
25 | 28 | nt.assert_almost_equal(spline(0).A, self.control_poses[0].A) |
26 | 29 | nt.assert_almost_equal(spline(1).A, self.control_poses[-1].A) |
27 | 30 |
|
| 31 | + @pytest.mark.skipif(os.environ.get("CI") == "true", reason="no display in CI") |
28 | 32 | def test_visualize(self): |
29 | 33 | spline = BSplineSE3(self.control_poses) |
30 | 34 | spline.visualize( |
@@ -65,6 +69,7 @@ def test_small_delta_t(self): |
65 | 69 | np.linspace(0, InterpSplineSE3._e, len(self.waypoints)), self.waypoints |
66 | 70 | ) |
67 | 71 |
|
| 72 | + @pytest.mark.skipif(os.environ.get("CI") == "true", reason="no display in CI") |
68 | 73 | def test_visualize(self): |
69 | 74 | spline = InterpSplineSE3(self.times, self.waypoints) |
70 | 75 | spline.visualize( |
@@ -105,8 +110,9 @@ def test_spline_fit(self): |
105 | 110 |
|
106 | 111 | assert fit.max_angular_error() < np.deg2rad(5.0) |
107 | 112 | assert fit.max_angular_error() < 0.1 |
108 | | - spline.visualize( |
109 | | - sample_times=np.linspace(0, self.time_horizon, 100), |
110 | | - animate=True, |
111 | | - repeat=False, |
112 | | - ) |
| 113 | + if os.environ.get("CI") != "true": |
| 114 | + spline.visualize( |
| 115 | + sample_times=np.linspace(0, self.time_horizon, 100), |
| 116 | + animate=True, |
| 117 | + repeat=False, |
| 118 | + ) |
0 commit comments