MCPcopy
hub / github.com/aio-libs/aiohttp / test_callbacks_on_release

Function test_callbacks_on_release

tests/test_client_connection.py:50–60  ·  view source on GitHub ↗
(connector, key, protocol, loop)

Source from the content-addressed store, hash-verified

48
49
50def test_callbacks_on_release(connector, key, protocol, loop) -> None:
51 conn = Connection(connector, key, protocol, loop)
52 notified = False
53
54 def cb():
55 nonlocal notified
56 notified = True
57
58 conn.add_callback(cb)
59 conn.release()
60 assert notified
61
62
63def test_callbacks_exception(connector, key, protocol, loop) -> None:

Callers

nothing calls this directly

Calls 3

add_callbackMethod · 0.95
releaseMethod · 0.95
ConnectionClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…