mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
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
1 changed files with 2 additions and 2 deletions
|
@ -1199,8 +1199,8 @@ class CoroutineTest(unittest.TestCase):
|
|||
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…
Add table
Add a link
Reference in a new issue