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))
def test_corner(self): b = Ball(300, 220) # dx = 5, dy = 5 b.move() self.assertTrue(b.rect() == (295, 215, 20, 20))