Beispiel #1
0
 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)
Beispiel #2
0
 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)
Beispiel #3
0
 def test_single(self):
     points = [ControlPoint(1, 2, False)]
     result = split_points(points)
     expected_result = [points]
     self.assertEquals(result, expected_result)
Beispiel #4
0
 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)
Beispiel #5
0
 def test_empty(self):
     points = []
     result = split_points(points)
     expected_result = []
     self.assertEquals(result, expected_result)