diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py index 353073dbfce00a..04c44c8b4ac583 100644 --- a/Lib/test/test_generators.py +++ b/Lib/test/test_generators.py @@ -2097,11 +2097,10 @@ def printsolution(self, x): ... SyntaxError: 'yield' outside function -# Pegen does not produce this error message yet -# >>> def f(): x = yield = y -# Traceback (most recent call last): -# ... -# SyntaxError: assignment to yield expression not possible +>>> def f(): x = yield = y +Traceback (most recent call last): + ... +SyntaxError: assignment to yield expression not possible >>> def f(): (yield bar) = y Traceback (most recent call last):