def test_intersection_wrong_parameter(): b = Box(10, 10, 10, 10) with pytest.raises(AssertionError): b.intersection(10)
def test_intersection(b2_args, isect): b1 = Box(100, 50, 60, 20) b2 = Box(*b2_args) assert isect == b1.intersection(b2) assert isect == b2.intersection(b1)