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:
Thomas Grainger 2025-03-25 08:29:51 +00:00 committed by GitHub
parent 7d9442f0d5
commit 6fb5f7f4d9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1199,8 +1199,8 @@ class CoroutineTest(unittest.TestCase):
def __aiter__(self): def __aiter__(self):
return self return self
anext_awaitable = anext(A(), "a").__await__() with contextlib.closing(anext(A(), "a").__await__()) as anext_awaitable:
self.assertRaises(TypeError, anext_awaitable.close, 1) self.assertRaises(TypeError, anext_awaitable.close, 1)
def test_with_1(self): def test_with_1(self):
class Manager: class Manager: