MCPcopy Create free account
hub / github.com/ccxt/ccxt / test_cancel

Function test_cancel

python/ccxt/pro/test/base/test_future.py:87–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85 assert isinstance(e, asyncio.CancelledError), "Expected asyncio.CancelledError"
86
87async def test_cancel():
88 print("test_cancel")
89 future = Future()
90 asyncio.create_task(cancel_later(future, 0.1))
91 try:
92 await future
93 assert False, "Expected an exception but none was raised"
94 except asyncio.CancelledError as e:
95 assert isinstance(e, asyncio.CancelledError), "Expected asyncio.CancelledError"
96
97async def test_race_cancel():
98 print("test_race_cancel")

Callers 1

test_ws_futureFunction · 0.85

Calls 2

FutureClass · 0.90
cancel_laterFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…