Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
kumar-sanjeeev committed Jan 3, 2025
1 parent b4d8821 commit 9b9f5d2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pyrobosim/test/core/test_world.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,18 @@ def test_create_world_default():

data_folder = get_data_folder()
TestWorldModeling.world.set_metadata(
locations=os.path.join(data_folder, "example_location_data.yaml"),
objects=os.path.join(data_folder, "example_object_data.yaml"),
locations=os.path.join(data_folder, "example_location_data_furniture.yaml"),
objects=os.path.join(data_folder, "example_object_data_food.yaml"),
)
TestWorldModeling.world.add_metadata(
locations=[
os.path.join(data_folder, "example_location_data_accessories.yaml")
],
objects=[os.path.join(data_folder, "example_object_data_drink.yaml")],
)
assert isinstance(TestWorldModeling.world, World)
assert len(TestWorldModeling.world.get_location_metadata().sources) == 2
assert len(TestWorldModeling.world.get_object_metadata().sources) == 2

##############################################
# These tests incrementally build up a world #
Expand Down
2 changes: 2 additions & 0 deletions pyrobosim/test/core/test_yaml_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ def test_create_world_from_yaml():
assert len(Location.metadata.data) > 0
assert hasattr(Object, "metadata")
assert len(Object.metadata.data) > 0
assert len(Location.metadata.sources) == 1
assert len(Object.metadata.sources) == 1

@staticmethod
@pytest.mark.dependency(
Expand Down

0 comments on commit 9b9f5d2

Please sign in to comment.