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

Function test_001ab_arbitrary

tests/async_tests/test_async_background_callbacks.py:12–34  ·  view source on GitHub ↗
(dash_duo, manager)

Source from the content-addressed store, hash-verified

10
11
12def test_001ab_arbitrary(dash_duo, manager):
13 if not is_dash_async():
14 return
15 with setup_background_callback_app(manager, "app_arbitrary_async") as app:
16 dash_duo.start_server(app)
17
18 dash_duo.wait_for_text_to_equal("#output", "initial")
19 # pause for sync
20 time.sleep(0.2)
21 dash_duo.find_element("#start").click()
22
23 dash_duo.wait_for_text_to_equal("#secondary", "first")
24 dash_duo.wait_for_style_to_equal(
25 "#secondary", "background-color", "rgba(255, 0, 0, 1)"
26 )
27 dash_duo.wait_for_text_to_equal("#output", "initial")
28 dash_duo.wait_for_text_to_equal("#secondary", "second")
29 dash_duo.wait_for_text_to_equal("#output", "completed")
30
31 dash_duo.find_element("#start-no-output").click()
32
33 dash_duo.wait_for_text_to_equal("#no-output", "started")
34 dash_duo.wait_for_text_to_equal("#no-output", "completed")
35
36
37@pytest.mark.skipif(

Callers

nothing calls this directly

Calls 7

is_dash_asyncFunction · 0.90
find_elementMethod · 0.80
start_serverMethod · 0.45
clickMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…