diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py index daa65718bfc9055..75fc9b621a1a014 100644 --- a/Lib/test/test_generators.py +++ b/Lib/test/test_generators.py @@ -2247,6 +2247,11 @@ def printsolution(self, x): ... SyntaxError: 'yield' outside function +>>> f=lambda: yield from range(10) +Traceback (most recent call last): + ... +SyntaxError: 'yield from' outside function + >>> def f(): x = yield = y Traceback (most recent call last): ...