def test_interval():
    assert (interval(1, 1) == interval(1, 1, is_valid=True)) == (True, True)
    assert (interval(1, 1) == interval(1, 1, is_valid=False)) == (True, False)
    assert (interval(1, 1) == interval(1, 1, is_valid=None)) == (True, None)
    assert (interval(1, 1.5) == interval(1, 2)) == (None, True)
    assert (interval(0, 1) == interval(2, 3)) == (False, True)
    assert (interval(0, 1) == interval(1, 2)) == (None, True)
    assert (interval(1, 2) != interval(1, 2)) == (False, True)
    assert (interval(1, 3) != interval(2, 3)) == (None, True)
    assert (interval(1, 3) != interval(-5, -3)) == (True, True)
    assert (
        interval(1, 3, is_valid=False) != interval(-5, -3)) == (True, False)
    assert (interval(1, 3, is_valid=None) != interval(-5, 3)) == (None, None)
    assert (interval(4, 4) != 4) == (False, True)
    assert (interval(1, 1) == 1) == (True, True)
    assert (interval(1, 3, is_valid=False) == interval(1, 3)) == (True, False)
    assert (interval(1, 3, is_valid=None) == interval(1, 3)) == (True, None)
    inter = interval(-5, 5)
    assert (interval(inter) == interval(-5, 5)) == (True, True)
    assert inter.width == 10
    assert 0 in inter
    assert -5 in inter
    assert 5 in inter
    assert interval(0, 3) in inter
    assert interval(-6, 2) not in inter
    assert -5.05 not in inter
    assert 5.3 not in inter
    interb = interval(-float('inf'), float('inf'))
    assert 0 in inter
    assert interb in inter
    assert interval(0, float('inf')) in interb
    assert interval(-float('inf'), 5) in interb
    assert interval(-1e50, 1e50) in interb
    assert (
        -interval(-1, -2, is_valid=False) == interval(1, 2)) == (True, False)
    raises(ValueError, lambda: interval(1, 2, 3))
dataset/ETHPy150Open sympy/sympy/sympy/plotting/intervalmath/tests/test_intervalmath.py/test_interval/swapped operands of `in`