def test_reset_ball(): ball = Ball(300, 400) ball.rect.x = 0 ball.rect.y = 0 ball.set_ball_speed(100, 100) random.seed(0) ball.reset_ball() assert ball.rect.x == 300 assert ball.rect.y == 400 assert ball.speed == (10, 0)
def test_set_ball_speed(): ball = Ball(300, 400) ball.set_ball_speed(100, 100) assert ball.speed == (100, 100)