

def test_Idx_construction():
    (i, a, b) = symbols('i a b', integer=True)
    assert (Idx(i) != Idx(i, 1))
    assert (Idx(i, a) == Idx(i, (0, (b - 1))))
    assert (Idx(i, oo) == Idx(i, (0, oo)))
    x = symbols('x')
    raises(TypeError, (lambda : Idx(x)))
    raises(TypeError, (lambda : Idx(0.5)))
    raises(TypeError, (lambda : Idx(i, x)))
    raises(TypeError, (lambda : Idx(i, 0.5)))
    raises(TypeError, (lambda : Idx(i, (x, 5))))
    raises(TypeError, (lambda : Idx(i, (2, x))))
    raises(TypeError, (lambda : Idx(i, (2, 3.5))))

dataset/ETHPy150Open sympy/sympy/sympy/tensor/tests/test_indexed.py test_Idx_construction/VarMisuse@58/69 `a`->`b`