Esempio n. 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)
Esempio n. 2
0
 def test_two_sharp_1(self):
     points = [
         ControlPoint(1, 2, False),
         ControlPoint(2, 3, True),
         ControlPoint(3, 1, True),
         ControlPoint(4, 2, False)
     ]
     result = split_points(points)
     expected_result = [
         [ControlPoint(1, 2, False),
          ControlPoint(2, 3, True)],
         [ControlPoint(2, 3, True),
          ControlPoint(3, 1, True)],
         [ControlPoint(3, 1, True),
          ControlPoint(4, 2, False)]
     ]
     self.assertEquals(result, expected_result)
Esempio n. 3
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)
Esempio n. 4
0
 def test_single(self):
     points = [ControlPoint(1, 2, False)]
     result = split_points(points)
     expected_result = [points]
     self.assertEquals(result, expected_result)