def METHOD_NAME(self):
    with self.assertRaisesRegex(SyntaxError, "cannot assign"):
        compile("{x: y for y, x in ((1, 2), (3, 4))} = 5", "<test>",
                "exec")
    with self.assertRaisesRegex(SyntaxError, "illegal expression"):
        compile("{x: y for y, x in ((1, 2), (3, 4))} += 5", "<test>",
                "exec")