Suggestion:

    latex_dict = {pi: r"\pi", E: r'e', ...}
    for a,b in latex_dict.items():
        assert latex(a) == b

Assuming everything to be tested is hashable, otherwise two lists would suffice. Something like:

    e = [E, pi, ...]
    le = [r'e', r'\pi', ...]
    for ei,lei in zip(e, le):
        assert latex(ei) == lei