Skip to content

Commit 5c89fa4

Browse files
committed
Remove visualization in test spline
1 parent abac9fc commit 5c89fa4

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

.github/workflows/master.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
env:
4141
MPLBACKEND: Agg
4242
run: |
43-
pytest -s --timeout=1000 --timeout_method=thread
43+
pytest -s --timeout=50 --timeout_method=thread
4444
4545
all-unittests-passed:
4646
needs: unittest

tests/test_spline.py

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import os
2+
import pytest
3+
14
import numpy.testing as nt
25
import numpy as np
36
import matplotlib.pyplot as plt
@@ -25,6 +28,7 @@ def test_evaluation(self):
2528
nt.assert_almost_equal(spline(0).A, self.control_poses[0].A)
2629
nt.assert_almost_equal(spline(1).A, self.control_poses[-1].A)
2730

31+
@pytest.mark.skipif(os.environ.get("CI") == "true", reason="no display in CI")
2832
def test_visualize(self):
2933
spline = BSplineSE3(self.control_poses)
3034
spline.visualize(
@@ -65,6 +69,7 @@ def test_small_delta_t(self):
6569
np.linspace(0, InterpSplineSE3._e, len(self.waypoints)), self.waypoints
6670
)
6771

72+
@pytest.mark.skipif(os.environ.get("CI") == "true", reason="no display in CI")
6873
def test_visualize(self):
6974
spline = InterpSplineSE3(self.times, self.waypoints)
7075
spline.visualize(
@@ -105,8 +110,9 @@ def test_spline_fit(self):
105110

106111
assert fit.max_angular_error() < np.deg2rad(5.0)
107112
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

Comments
 (0)