File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -406,6 +406,9 @@ def test_pose_remove_components(self):
406
406
pose_copy = pose_copy .remove_components ([component_to_remove ])
407
407
self .assertEqual (initial_count , len (pose_copy .header .components ))
408
408
409
+
410
+
411
+
409
412
# can we "remove" a point that doesn't exist from a component that does without crashing
410
413
point_to_remove = "2_x"
411
414
component_to_remove_point_from = "2"
@@ -414,6 +417,17 @@ def test_pose_remove_components(self):
414
417
pose_copy = pose_copy .remove_components ([], {component_to_remove_point_from :[point_to_remove ]})
415
418
self .assertNotIn (point_to_remove , pose_copy .header .components [2 ].points )
416
419
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
+
417
431
# can we remove a point from a component that doesn't exist
418
432
point_to_remove = "2_x"
419
433
component_to_remove_point_from = "NOT EXISTING"
You can’t perform that action at this time.
0 commit comments