import tempfile import unittest from pathlib import Path from unittest import mock from tests.python.support.paths import add_repo_path add_repo_path("skills/urdf/scripts") from urdf import cli from urdf.source import UrdfSourceError def _write_urdf_source(path: Path, body: str) -> None: path.write_text( "\n".join( [ "def gen_urdf():", *[f" {line}" for line in body.splitlines()], "", ] ), encoding="utf-8", ) def _strip_cadpy_metadata_comments(text: str) -> str: return "\n".join( line for line in text.splitlines() if not line.startswith("