Skip to content

Commit 794df94

Browse files
committed
Another quick test case
1 parent 0d52c53 commit 794df94

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/python/tests/pose_test.py

+14
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,9 @@ def test_pose_remove_components(self):
406406
pose_copy = pose_copy.remove_components([component_to_remove])
407407
self.assertEqual(initial_count, len(pose_copy.header.components))
408408

409+
410+
411+
409412
# can we "remove" a point that doesn't exist from a component that does without crashing
410413
point_to_remove = "2_x"
411414
component_to_remove_point_from = "2"
@@ -414,6 +417,17 @@ def test_pose_remove_components(self):
414417
pose_copy = pose_copy.remove_components([], {component_to_remove_point_from:[point_to_remove]})
415418
self.assertNotIn(point_to_remove, pose_copy.header.components[2].points)
416419

420+
421+
# can we "remove" an empty list of points
422+
component_to_remove_point_from = "2"
423+
pose_copy = pose.copy()
424+
initial_component_count = len(pose_copy.header.components)
425+
initial_point_count = len(pose_copy.header.components[2].points)
426+
pose_copy = pose_copy.remove_components([], {component_to_remove_point_from:[]})
427+
self.assertEqual(initial_component_count, len(pose_copy.header.components))
428+
self.assertEqual(len(pose_copy.header.components[2].points), initial_point_count)
429+
430+
417431
# can we remove a point from a component that doesn't exist
418432
point_to_remove = "2_x"
419433
component_to_remove_point_from = "NOT EXISTING"

0 commit comments

Comments
 (0)