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

Function test_await_canceled_future

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

Source from the content-addressed store, hash-verified

75 assert str(e) == "Error in future1", f"Expected 'Error in future1', got '{str(e)}'"
76
77async def test_await_canceled_future():
78 print("test_await_canceled_future")
79 future = Future()
80 try:
81 future.cancel()
82 await future
83 assert False, "Expected an exception but none was raised"
84 except asyncio.CancelledError as e:
85 assert isinstance(e, asyncio.CancelledError), "Expected asyncio.CancelledError"
86
87async def test_cancel():
88 print("test_cancel")

Callers 1

test_ws_futureFunction · 0.85

Calls 1

FutureClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…