def test_SetGetAngularPositionVector_fails(): kine = Kinematic() with pytest.raises(TypeError): kine.r = 1 with pytest.raises(TypeError): kine.r = None with pytest.raises(ValueError): kine.r = (1, 0, 0, 0)
def test_SetGetAngularPositionVector_random(): kine = Kinematic() Ntests = 100 for i in range(Ntests): new_position = np.random.rand(3) kine.r = new_position np.testing.assert_almost_equal(new_position, kine.r)