AST assertions should not compare against the string representation
Many of the sanity assertions in the core compare AST results against their string representation. While testing the string representation may be useful, it is not the appropriate place. Tests should be against instances of an AST.
- nodes may contain sets making their string representation non-deterministic (and either failing somethings or requiring a check against all possible outcomes)
- different AST's may have the same text representation
- writing the AST as a construction of python objects serves as documentation itself in outlining what the AST actually looks like