def test_parallel_lines(self):
     try:
         intersection(1, 1, 2, 1, 1, 3)
     except ZeroDivisionError:
         pass
     else:
         raise Exception()
 def test_intersection(self):
     result = intersection(1, 2, 5, -1, 2, 3)
     self.assertEqual((1, 2), result)
Example #3
0
 def test_intersection(self):
     result = intersection(1, 2, 5, -1, 2, 3)
     if (1, 2) != result:
         raise Exception()
 def test_parallel_lines(self):
     with self.assertRaises(ZeroDivisionError):
         intersection(1, 1, 2, 1, 1, 3)
Example #5
0
 def test_intersection(self):
     result = intersection(1, 2, 5, -1, 2, 3)
     assert (1, 2) == result