Skip to content

Commit fe25242

Browse files
committed
fix: skip test_process_xacro_with_simple_file when xacro not installed
1 parent 34f8d90 commit fe25242

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

dimos/utils/test_ament_prefix.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
from __future__ import annotations
1818

19+
import importlib.util
1920
import os
2021
from pathlib import Path
2122

@@ -28,6 +29,10 @@
2829
not ament_prefix._has_ament, reason="ament_index_python not installed"
2930
)
3031

32+
_needs_xacro = pytest.mark.skipif(
33+
not importlib.util.find_spec("xacro"), reason="xacro not installed"
34+
)
35+
3136

3237
@pytest.fixture(autouse=True)
3338
def _isolate_ament_state(monkeypatch: pytest.MonkeyPatch, tmp_path: Path) -> None:
@@ -129,6 +134,7 @@ def test_ament_index_resolves(tmp_path: Path) -> None:
129134
assert Path(resolved).resolve() == pkg_dir.resolve()
130135

131136

137+
@_needs_xacro
132138
def test_process_xacro_with_simple_file(tmp_path: Path) -> None:
133139
"""Test process_xacro works with a minimal xacro file (no $(find))."""
134140
xacro_file = tmp_path / "test.urdf.xacro"

0 commit comments

Comments
 (0)