def test_set(): i7 = Integer(7) y = Symbol("y") g = function_symbol("g", y) c = 2*I + 3 A = DenseMatrix(2, 2, [Integer(5), Symbol("x"), function_symbol("f", Symbol("x")), 1 + I]) A.set(0, 0, i7) assert A.get(0, 0) == i7 A.set(0, 1, y) assert A.get(0, 1) == y A.set(1, 0, g) assert A.get(1, 0) == g A.set(1, 1, c) assert A.get(1, 1) == c