Skip to content

Commit 3e675b7

Browse files
committed
Skip tests for spline graphics during CI
2 parents c42cc1e + 385c423 commit 3e675b7

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

tests/test_spline.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import numpy.testing as nt
22
import numpy as np
33
import matplotlib.pyplot as plt
4+
import os
45
import unittest
6+
import pytest
57

68
from spatialmath import BSplineSE3, SE3, InterpSplineSE3, SplineFit, SO3
79

@@ -25,6 +27,10 @@ def test_evaluation(self):
2527
nt.assert_almost_equal(spline(0).A, self.control_poses[0].A)
2628
nt.assert_almost_equal(spline(1).A, self.control_poses[-1].A)
2729

30+
@pytest.mark.skipif(
31+
os.environ.get("CI") == "true",
32+
reason="no display in CI",
33+
)
2834
def test_visualize(self):
2935
spline = BSplineSE3(self.control_poses)
3036
spline.visualize(
@@ -65,6 +71,10 @@ def test_small_delta_t(self):
6571
np.linspace(0, InterpSplineSE3._e, len(self.waypoints)), self.waypoints
6672
)
6773

74+
@pytest.mark.skipif(
75+
os.environ.get("CI") == "true",
76+
reason="no display in CI",
77+
)
6878
def test_visualize(self):
6979
spline = InterpSplineSE3(self.times, self.waypoints)
7080
spline.visualize(
@@ -105,7 +115,8 @@ def test_spline_fit(self):
105115

106116
assert fit.max_angular_error() < np.deg2rad(5.0)
107117
assert fit.max_angular_error() < 0.1
108-
spline.visualize(
118+
if os.environ.get("CI") != "true":
119+
spline.visualize(
109120
sample_times=np.linspace(0, self.time_horizon, 100),
110121
animate=True,
111122
repeat=False,

0 commit comments

Comments
 (0)