def test_unify_matrix_indexed_named_variable_int(): with pytest.raises(IncompatibleTypes): tenv = {} Tmatrix().unify(Tindexed(Tnamed(tenv, "x")), tenv=tenv) Tindexed(Tnamed(tenv, "y")).unify(Tnamed(tenv, "x"), tenv=tenv) Tint().unify(Tnamed(tenv, "y"), tenv=tenv)
def test_unify_matrix_indexed_named_variable_real(): tenv = {} Tmatrix().unify(Tindexed(Tnamed(tenv, "x")), tenv=tenv) Tindexed(Tnamed(tenv, "y")).unify(Tnamed(tenv, "x"), tenv=tenv) Treal().unify(Tnamed(tenv, "y"), tenv=tenv)
def test_unify_matrix_indexed_real2(): Tmatrix().unify(Tindexed(Tindexed(Treal())))
def test_unify_matrix_indexed_real3(): with pytest.raises(IncompatibleTypes): Tmatrix().unify(Tindexed(Tindexed(Tindexed(Treal()))))
def test_unify_matrix_indexed2(): Tmatrix().unify(Tindexed(Tindexed()))