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

Function test_race_with_precompleted_future

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

Source from the content-addressed store, hash-verified

152 await task
153
154async def test_race_with_precompleted_future():
155 print("test_race_with_precompleted_future")
156 future1 = Future()
157 future2 = Future()
158 future1.resolve("immediate success")
159 # Immediately resolved future before race call
160 race_future = Future.race([future1, future2])
161 result = await race_future
162 assert result == "immediate success", "Race did not correctly prioritize already completed future."
163
164async def test_closed_by_user():
165 print("test_closed_by_user")

Callers 1

test_ws_futureFunction · 0.85

Calls 3

resolveMethod · 0.95
FutureClass · 0.90
raceMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…