def testGenerateRandomHeadPositionBorderFuzzTest(self): for i in range(100): snake = Snake() if snake.generateRandomHeadCoordinates().x < 6: raise AssertionError("Generated x coordinate shouldn't be smaller than 5!!!")
def testGenerateRandomHeadPosition(self): snake = Snake() headCoordinates1 = snake.generateRandomHeadCoordinates() headCoordinates2 = snake.generateRandomHeadCoordinates() self.assertNotEqual(headCoordinates1, headCoordinates2, "Coordinates shouldn't be equal!\nCoordinates 1: X:{0},Y:{1}\nCoordinates 2: X:{2},Y:{3}".format(headCoordinates1.x, headCoordinates1.y, headCoordinates2.x, headCoordinates2.y))