diff --git a/tests/test_urdf_parsing.py b/tests/test_urdf_parsing.py index 4591693..96540a4 100644 --- a/tests/test_urdf_parsing.py +++ b/tests/test_urdf_parsing.py @@ -1,3 +1,5 @@ +import pathlib + import pytest import robot_descriptions import robot_descriptions.loaders.idyntree @@ -37,9 +39,12 @@ def test_urdf_parsing(robot: Robot) -> None: # Check that it fails is is_urdf=True and the resource is a non-existing path with pytest.raises(FileNotFoundError): - _ = rod.Sdf.load(sdf="/non/existing/path", is_urdf=None) _ = rod.Sdf.load(sdf="/non/existing/path", is_urdf=False) + # Check that it fails is is_urdf=True and the resource is an empty string + with pytest.raises(FileNotFoundError): + _ = rod.Sdf.load(sdf=pathlib.Path("/non/existing/path"), is_urdf=False) + # The following instead should succeed _ = rod.Sdf.load(sdf=urdf_path, is_urdf=None) _ = rod.Sdf.load(sdf=urdf_path, is_urdf=True)