MCPcopy
hub / github.com/plotly/dash / until

Function until

dash/testing/wait.py:14–32  ·  view source on GitHub ↗
(
    wait_cond, timeout, poll=0.1, msg="expected condition not met within timeout"
)

Source from the content-addressed store, hash-verified

12
13
14def until(
15 wait_cond, timeout, poll=0.1, msg="expected condition not met within timeout"
16): # noqa: C0330
17 res = wait_cond()
18 logger.debug(
19 "start wait.until with method, timeout, poll => %s %s %s",
20 wait_cond,
21 timeout,
22 poll,
23 )
24 end_time = time.time() + timeout
25 while not res:
26 if time.time() > end_time:
27 raise TestingTimeoutError(msg)
28 time.sleep(poll)
29 res = wait_cond()
30 logger.debug("poll => %s", time.time())
31
32 return res
33
34
35def until_not(

Callers 15

test_grva003_empty_graphFunction · 0.90
get_graph_pointsFunction · 0.90
__init__Method · 0.90
percy_snapshotMethod · 0.90
wait_for_no_elementsMethod · 0.90

Calls 1

TestingTimeoutErrorClass · 0.90

Used in the wild real call sites across dependent graphs

searching dependent graphs…