def test_parallel_lines(self):
     try:
         intersection(1, 1, 2, 1, 1, 3)
     except ZeroDivisionError:
         pass
     else:
         raise Exception()
 def test_zero_division(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(result, (1, 2))
 def test_intersection(self):
     result = intersection(1, 2, 5, -1, 2, 3)
     if result != (1, 2):
         raise Exception()
 def test_parallel_lines(self):
     with self.assertRaises(ZeroDivisionError):
         intersection(1, 1, 2, 1, 1, 3)
Example #6
0
 def test_intersection(self):
     result = intersection(1, 2, 5, -1, 2, 3)
     assert (1, 2) == result
 def test_intersection(self):
     print(intersection(1, 2, 3, -4, 1, -6))
Example #8
0
 def test_zero_division(self):
     with self.assertRaises(ZeroDivisionError):
         intersection(1, 1, 2, 1, 1, 3)
Example #9
0
def test_union(input, expected):
    lst1, lst2 = input
    llst1, llst2 = get_llst(lst1, lst2)

    assert str(intersection(llst1, llst2)) == expected