MCPcopy Index your code
hub / github.com/python/cpython / test_aclose

Method test_aclose

Lib/test/test_asyncgen.py:2033–2041  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2031 g.athrow()
2032
2033 def test_aclose(self):
2034 async def gen():
2035 yield 1
2036
2037 msg = f"coroutine method 'aclose' of '{gen.__qualname__}' was never awaited"
2038 with self.assertWarnsRegex(RuntimeWarning, msg):
2039 g = gen()
2040 g.aclose()
2041 gc_collect()
2042
2043 def test_aclose_throw(self):
2044 async def gen():

Callers

nothing calls this directly

Calls 4

gc_collectFunction · 0.90
assertWarnsRegexMethod · 0.80
genFunction · 0.70
acloseMethod · 0.45

Tested by

no test coverage detected