Code
Hub
Workspaces
Following
Digest
Agents
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/python/cpython
/ aclose
Method
aclose
Lib/test/test_contextlib_async.py:475–476 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
473
state = []
474
class
C:
475
async
def
aclose(self):
476
state.append(1)
477
x = C()
478
self.assertEqual(state, [])
479
async
with
aclosing(x)
as
y:
Callers
10
_asyncgen_finalizer_hook
Method · 0.45
shutdown_asyncgens
Method · 0.45
test_async_gen_api_01
Method · 0.45
run
Method · 0.45
test_async_gen_throw_same_aclose_coro_twice
Method · 0.45
test_async_gen_throw_custom_same_aclose_coro_twice
Method · 0.45
test_aclose
Method · 0.45
test_aclose_throw
Method · 0.45
test_async_gen_propagates_generator_exit
Method · 0.45
asyncTearDown
Method · 0.45
Calls
1
append
Method · 0.45
Tested by
no test coverage detected