From a12ae0df426e5209a4b24b830f4973ed29ee4f8f Mon Sep 17 00:00:00 2001 From: Felix Exner Date: Wed, 15 Nov 2023 06:06:52 +0000 Subject: [PATCH] Parametrize urdf tests with all robot models, tf_prefix and mock hardware --- test/test_ur_urdf_xacro.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/test/test_ur_urdf_xacro.py b/test/test_ur_urdf_xacro.py index b19428d..fd837b2 100644 --- a/test/test_ur_urdf_xacro.py +++ b/test/test_ur_urdf_xacro.py @@ -32,20 +32,23 @@ import shutil import subprocess import tempfile +import pytest from ament_index_python.packages import get_package_share_directory -def test_ur_urdf_xacro(): +@pytest.mark.parametrize( + "ur_type", ["ur3", "ur3e", "ur5", "ur5e", "ur10", "ur10e", "ur16e", "ur20"] +) +@pytest.mark.parametrize("description_file", ["ur.urdf.xacro", "ur_mocked.urdf.xacro"]) +@pytest.mark.parametrize("prefix", ["", "my_ur_"]) +def test_ur_urdf_xacro(ur_type, description_file, prefix): # Initialize Arguments - ur_type = "ur3" safety_limits = "true" safety_pos_margin = "0.15" safety_k_position = "20" # General Arguments description_package = "ur_description" - description_file = "ur.urdf.xacro" - prefix = '""' joint_limit_params = os.path.join( get_package_share_directory(description_package), "config", ur_type, "joint_limits.yaml"