Skip to content

Commit

Permalink
Modifies velocity test
Browse files Browse the repository at this point in the history
Signed-off-by: Voldivh <[email protected]>
  • Loading branch information
Voldivh committed Aug 1, 2023
1 parent a0b8568 commit 3ca2981
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions python/test/joint_TEST.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ def on_pre_udpate_cb(_info, _ecm):
# Sensors Test
self.assertEqual(8, joint.sensor_by_name(_ecm, 'sensor_test'))
self.assertEqual(1, joint.sensor_count(_ecm))
# Velocity Test
self.assertEqual(None, joint.velocity(_ecm))
# Velocity Test.
joint.enable_velocity_check(_ecm, True)
joint.set_velocity(_ecm, [10])
# This should be 'self.assertEqual([10], joint.velocity(_ecm))'
self.assertEqual([], joint.velocity(_ecm))
joint.enable_velocity_check(_ecm, False)
if pre_iterations == 0:
self.assertEqual(None, joint.velocity(_ecm))
elif pre_iterations > 1:
self.assertAlmostEqual(10, joint.velocity(_ecm)[0])
# Position Test
self.assertEqual(None, joint.position(_ecm))
joint.enable_position_check(_ecm, True)
Expand Down

0 comments on commit 3ca2981

Please sign in to comment.