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

Function test_reject

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

Source from the content-addressed store, hash-verified

32 assert future.result() == expected_result, f"Expected result '{expected_result}', got '{future.result()}'"
33
34async def test_reject():
35 print("test_reject")
36 future = Future()
37 test_exception = Exception("test error")
38 future.reject(test_exception)
39 assert future.done(), "Future is not marked as done"
40 try:
41 future.result()
42 assert False, "Expected an exception but none was raised"
43 except Exception as e:
44 assert str(e) == "test error", f"Expected 'test error', got '{str(e)}'"
45
46async def test_race_success_before():
47 print("test_race_success")

Callers 1

test_ws_futureFunction · 0.85

Calls 3

rejectMethod · 0.95
FutureClass · 0.90
ExceptionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…