mirror of https://github.com/python/cpython.git
gh-131707: fix unawaited coroutine warning in test_coroutines.Corouti… (#131708)
gh-131707: fix unawaited coroutine warning in test_coroutines.CoroutineTest.test_17
This commit is contained in:
parent
7d9442f0d5
commit
6fb5f7f4d9
|
@ -1199,8 +1199,8 @@ async def __anext__(self):
|
|||
def __aiter__(self):
|
||||
return self
|
||||
|
||||
anext_awaitable = anext(A(), "a").__await__()
|
||||
self.assertRaises(TypeError, anext_awaitable.close, 1)
|
||||
with contextlib.closing(anext(A(), "a").__await__()) as anext_awaitable:
|
||||
self.assertRaises(TypeError, anext_awaitable.close, 1)
|
||||
|
||||
def test_with_1(self):
|
||||
class Manager:
|
||||
|
|
Loading…
Reference in New Issue