def test_three(self): points = [ ControlPoint(1, 2, False), ControlPoint(2, 3, False), ControlPoint(3, 1, False) ] result = split_points(points) expected_result = [points] self.assertEquals(result, expected_result)
def test_one_sharp(self): points = [ ControlPoint(1, 2, False), ControlPoint(2, 3, True), ControlPoint(3, 1, False) ] result = split_points(points) expected_result = [[ ControlPoint(1, 2, False), ControlPoint(2, 3, True) ], [ControlPoint(2, 3, True), ControlPoint(3, 1, False)]] self.assertEquals(result, expected_result)
def test_single(self): points = [ControlPoint(1, 2, False)] result = split_points(points) expected_result = [points] self.assertEquals(result, expected_result)
def test_two_mixed_2(self): points = [ControlPoint(1, 2, False), ControlPoint(2, 3, True)] result = split_points(points) expected_result = [points] self.assertEquals(result, expected_result)
def test_empty(self): points = [] result = split_points(points) expected_result = [] self.assertEquals(result, expected_result)