

def test_Indexed_constructor():
    (i, j) = symbols('i j', integer=True)
    A = Indexed('A', i, j)
    assert (A == Indexed(Symbol('A'), i, j))
    assert (A == Indexed(IndexedBase('A'), i, j))
    raises(TypeError, (lambda : Indexed(A, i, j)))
    raises(IndexException, (lambda : Indexed('A')))

dataset/ETHPy150Open sympy/sympy/sympy/tensor/tests/test_indexed.py test_Indexed_constructor/original