summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_generators.py
diff options
context:
space:
mode:
authorGregor <36135323+gege-hoho@users.noreply.github.com>2024-07-18 12:29:03 (GMT)
committerGitHub <noreply@github.com>2024-07-18 12:29:03 (GMT)
commit1056f2bc208bdfe562c79d2a5098723c50ae9c23 (patch)
treedfbfb59016d597a60ab5f5140093cd96c11dcb2f /Lib/test/test_generators.py
parent3eacfc1a4d09a9807bedba58ef4037788b6df961 (diff)
downloadcpython-1056f2bc208bdfe562c79d2a5098723c50ae9c23.zip
cpython-1056f2bc208bdfe562c79d2a5098723c50ae9c23.tar.gz
cpython-1056f2bc208bdfe562c79d2a5098723c50ae9c23.tar.bz2
gh-121657: Additional `yield from` error test using lambda (GH-121722)
Diffstat (limited to 'Lib/test/test_generators.py')
-rw-r--r--Lib/test/test_generators.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py
index 34f79da..3cb4d51 100644
--- a/Lib/test/test_generators.py
+++ b/Lib/test/test_generators.py
@@ -2247,6 +2247,11 @@ Traceback (most recent call last):
...
SyntaxError: 'yield' outside function
+>>> f=lambda: (yield from (1,2)), (yield from (3,4))
+Traceback (most recent call last):
+ ...
+SyntaxError: 'yield from' outside function
+
>>> yield from [1,2]
Traceback (most recent call last):
...