def test_intersects():
    assert Interval.closed(1, 3).intersects(Interval.closed(2, 3))
    assert Interval.closed(1, 3).intersects((2, 3))
    assert Interval.closed(1, 3).intersects((1, 3))
    assert Interval.closed(1, 3).intersects(Interval.open(1, 3))
    assert Interval.closed(1, 3).intersects(Interval.closed(3, 4))
    assert (not Interval.closed(1, 3).intersects(Interval.open(3, 4)))
    assert (not Interval.open(1, 3).intersects(Interval.closed(3, 4)))
    assert Interval.point(3).intersects(Interval.closed(3, 4))
    assert Interval.point(3).intersects(Interval.closed(1, 3))
    assert (not Interval.point(3).intersects(Interval.open(3, 4)))
    assert (not Interval.point(3).intersects(Interval.open(1, 3)))
    assert Interval.closed(1, 3).intersects(Interval.closed(0, 1))
    assert (not Interval.closed(1, 3).intersects(Interval.open(0, 1)))
    assert (not Interval.open(1, 3).intersects(Interval.closed(0, 1)))
    assert (not Interval.closed(1, 3).intersects(Interval.closed(4, 5)))
    assert (not Interval.closed(1, 3).intersects(Interval.closed((- 2), 0)))
    assert (not Interval.closed(1, 3).intersects(Interval.empty()))
    assert Interval.closed(1, 3).intersects(Interval.infinite())
    assert (not Interval.point(1).intersects(Interval.open_closed(1, 2)))
def test_intersects():
    assert Interval.closed(1, 3).intersects(Interval.closed(2, 3))
    assert Interval.closed(1, 3).intersects((2, 3))
    assert Interval.closed(1, 3).intersects((1, 3))
    assert Interval.closed(1, 3).intersects(Interval.open(1, 3))
    assert Interval.closed(1, 3).intersects(Interval.closed(3, 4))
    assert (not Interval.closed(1, 3).intersects(Interval.open(3, 4)))
    assert (not Interval.open(1, 3).intersects(Interval.closed(3, 4)))
    assert Interval.point(3).intersects(Interval.closed(3, 4))
    assert Interval.point(3).intersects(Interval.closed(1, 3))
    assert (not Interval.point(3).intersects(Interval.open(3, 4)))
    assert (not Interval.point(3).intersects(Interval.open(1, 3)))
    assert Interval.closed(1, 3).intersects(Interval.closed(0, 1))
    assert (not Interval.closed(1, 3).intersects(Interval.open(0, 1)))
    assert (not Interval.open(1, 3).intersects(Interval.closed(0, 1)))
    assert (not Interval.closed(1, 3).intersects(Interval.closed(4, 5)))
    assert (not Interval.closed(1, 3).intersects(Interval.closed((- 2), 0)))
    assert (not Interval.closed(1, 3).intersects(Interval.empty()))
    assert Interval.closed(1, 3).intersects(Interval.infinite())
    assert (not Interval.point(1).intersects(Interval.open_closed(1, 2)))