コード例 #1
0
 def test_move(self):
     for param in ParamBallTest.TEST_VALUES:
         with self.subTest(param=param):
             x0, y0, x1, y1 = param
             b = Ball(x0, y0)
             b.move()
             self.assertTrue(b.rect() == (x1, y1, 20, 20))
コード例 #2
0
 def test_move(self):
     for param in ParamBallTest.TEST_VALUES:
         with self.subTest(param=param):
             x0, y0, x1, y1 = param
             b = Ball(x0, y0)
             b.move()
             self.assertTrue(b.rect() == (x1, y1, 20, 20))
コード例 #3
0
 def test_corner(self):
     b = Ball(300, 220)  # dx = 5, dy = 5
     b.move()
     self.assertTrue(b.rect() == (295, 215, 20, 20))
コード例 #4
0
 def test_corner(self):
     b = Ball(300, 220)  # dx = 5, dy = 5
     b.move()
     self.assertTrue(b.rect() == (295, 215, 20, 20))