コード例 #1
0
ファイル: test_rawinput.py プロジェクト: pombredanne/dsystem
 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)
コード例 #2
0
 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)
コード例 #3
0
ファイル: test_rawinput.py プロジェクト: pombredanne/dsystem
 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)
コード例 #4
0
 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)