Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7d9442f commit 6fb5f7fCopy full SHA for 6fb5f7f
1 file changed
Lib/test/test_coroutines.py
@@ -1199,8 +1199,8 @@ async def __anext__(self):
1199
def __aiter__(self):
1200
return self
1201
1202
- anext_awaitable = anext(A(), "a").__await__()
1203
- self.assertRaises(TypeError, anext_awaitable.close, 1)
+ with contextlib.closing(anext(A(), "a").__await__()) as anext_awaitable:
+ self.assertRaises(TypeError, anext_awaitable.close, 1)
1204
1205
def test_with_1(self):
1206
class Manager:
0 commit comments