Skip to content

Commit 854b898

Browse files
author
User
committed
fix(test): replace yield with do_something() in correct_while8 fixture
yield is only valid inside a function; the test fixture string was causing a SyntaxError when compiled at module level. The intent of the test case (while True inside try/except with nesting) is preserved.
1 parent 7441f22 commit 854b898

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/test_visitors/test_ast/test_loops/test_loops/test_infinite_while_loops.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ async def worker():
111111
try:
112112
if some:
113113
while True:
114-
yield some
114+
do_something()
115115
except StopIteration:
116116
pass
117117
"""

0 commit comments

Comments
 (0)