Skip to content

Commit

Permalink
Add tests for 'yield from'
Browse files Browse the repository at this point in the history
  • Loading branch information
HarryLHW committed Jul 13, 2024
1 parent 77c5399 commit ff0731f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Lib/test/test_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
...
Expand Down

0 comments on commit ff0731f

Please sign in to comment.