Skip to content

Commit 75a604d

Browse files
committed
Simplify CallGeneratorOnDealloc
1 parent 8078d01 commit 75a604d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Lib/test/test_coroutines.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2270,9 +2270,7 @@ def test_call_generator_in_frame_clear(self):
22702270
# should not be misinterpreted as a yield.
22712271
class CallGeneratorOnDealloc:
22722272
def __del__(self):
2273-
def gen():
2274-
yield 1
2275-
next(gen())
2273+
next(x for x in [1])
22762274

22772275
async def coro():
22782276
obj = CallGeneratorOnDealloc()

0 commit comments

Comments
 (0)