Skip to content

Commit

Permalink
Remove is_urdf argument from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
flferretti committed Sep 20, 2024
1 parent 7d2f865 commit e6cf506
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion tests/test_urdf_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def test_urdf_exporter(robot: Robot) -> None:
original_urdf_path = ModelFactory.get_model_description(robot=robot)

# Load the URDF (it gets converted to SDF internally).
sdf = rod.Sdf.load(sdf=original_urdf_path, is_urdf=True)
sdf = rod.Sdf.load(sdf=original_urdf_path)

# Export the URDF from the in-memory SDF-based description.
exported_urdf_string = rod.urdf.exporter.UrdfExporter().to_urdf_string(sdf=sdf)
Expand Down
6 changes: 1 addition & 5 deletions tests/test_urdf_parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ def test_urdf_parsing(robot: Robot) -> None:
with pytest.raises(RuntimeError):
_ = rod.Sdf.load(sdf=urdf_path.read_text(), is_urdf=False)

# Check that it fails if is_urdf=False and the resource is an urdf string
with pytest.raises(RuntimeError):
_ = rod.Sdf.load(sdf=urdf_path.read_text(), is_urdf=None)

# The following instead should succeed
_ = rod.Sdf.load(sdf=urdf_path, is_urdf=None)
_ = rod.Sdf.load(sdf=urdf_path, is_urdf=True)
Expand All @@ -47,7 +43,7 @@ def test_urdf_parsing(robot: Robot) -> None:
_ = rod.Sdf.load(sdf=urdf_path.read_text(), is_urdf=True)

# Load once again the urdf
rod_sdf = rod.Sdf.load(sdf=urdf_path, is_urdf=True)
rod_sdf = rod.Sdf.load(sdf=urdf_path)

# There should be only one model
assert len(rod_sdf.models()) == 1
Expand Down

0 comments on commit e6cf506

Please sign in to comment.