def test_check_coordinates_builtin(self): with self.assertRaises(ValueError): absoluteMotion(-5, 5) with self.assertRaises(ValueError): absoluteMotion(5, -5) with self.assertRaises(ValueError): absoluteMotionWithTrajectory(10, 10, -5, 5) with self.assertRaises(ValueError): absoluteMotionWithTrajectory(10, 10, 5, -5) with self.assertRaises(ValueError): absoluteMotionWithTrajectory(-5, 5, 10, 10) with self.assertRaises(ValueError): absoluteMotionWithTrajectory(5, -5, 10, 10) with self.assertRaises(ValueError): click(-5, 5) with self.assertRaises(ValueError): click(5, -5) with self.assertRaises(ValueError): doubleClick(-5, 5) with self.assertRaises(ValueError): doubleClick(5, -5) with self.assertRaises(ValueError): press(-5, 5) with self.assertRaises(ValueError): press(5, -5) with self.assertRaises(ValueError): release(-5, 5) with self.assertRaises(ValueError): release(5, -5)
def test_motion_with_trajectory(self): absoluteMotionWithTrajectory(100, 100, 120, 120) absoluteMotionWithTrajectory(120, 120, 120, 120) absoluteMotionWithTrajectory(120, 120, 130, 120) absoluteMotionWithTrajectory(130, 120, 130, 130) absoluteMotionWithTrajectory(130, 130, 150, 100, mouseDelay=0.1)