Пример #1
0
 def test_containing_pt_ct_negative_nonunity_slope(self):
     s1 = IntegerSegment(IntegerPoint(0, 0), IntegerPoint(4, -6))
     res = s1.containing_pt_ct()
     self.assertEqual(res, 3)
Пример #2
0
 def test_containing_pt_ct_vertical(self):
     s1 = IntegerSegment(IntegerPoint(0, 0), IntegerPoint(0, 2))
     res = s1.containing_pt_ct()
     self.assertEqual(res, 3)
Пример #3
0
 def test_containing_pt_ct_positive_unity_slope(self):
     s1 = IntegerSegment(IntegerPoint(0, 0), IntegerPoint(2, 2))
     res = s1.containing_pt_ct()
     self.assertEqual(res, 3)
Пример #4
0
 def test_containing_pt_ct_zero_length(self):
     s1 = IntegerSegment(IntegerPoint(0, 0), IntegerPoint(0, 0))
     res = s1.containing_pt_ct()
     self.assertEqual(res, 1)