#Python 3, 79 bytes

<!-- language-all: lang-py -->

    A='G="A=%r;exec(A);assert len(G)==30";print(end=G%A)';exec(A);assert len(G)==30

Switching to Python 3 so that the trailing newline can be easily removed.