Skip to content

Commit dfafc7a

Browse files
authored
Merge branch 'main' into add-eager-start-to-create-task
2 parents 813398c + 6fb5f7f commit dfafc7a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/test_coroutines.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,8 +1199,8 @@ async def __anext__(self):
11991199
def __aiter__(self):
12001200
return self
12011201

1202-
anext_awaitable = anext(A(), "a").__await__()
1203-
self.assertRaises(TypeError, anext_awaitable.close, 1)
1202+
with contextlib.closing(anext(A(), "a").__await__()) as anext_awaitable:
1203+
self.assertRaises(TypeError, anext_awaitable.close, 1)
12041204

12051205
def test_with_1(self):
12061206
class Manager:

0 commit comments

Comments
 (0)