Skip to content

Commit db28caf

Browse files
committed
Test output is handled in error handler.
1 parent 977b809 commit db28caf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/integration/callbacks/test_callback_error.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,12 @@ def global_callback_error_handler(err):
1212
html.Button("start-global", id="start-global"),
1313
html.Div(id="output"),
1414
html.Div(id="output-global"),
15+
html.Div(id="error-message"),
1516
]
1617

1718
def on_callback_error(err):
18-
set_props("output", {"children": f"callback: {err}"})
19+
set_props("error-message", {"children": f"message: {err}"})
20+
return f"callback: {err}"
1921

2022
@app.callback(
2123
Output("output", "children"),
@@ -38,6 +40,7 @@ def on_start_global(_):
3840
dash_duo.find_element("#start-local").click()
3941

4042
dash_duo.wait_for_text_to_equal("#output", "callback: local error")
43+
dash_duo.wait_for_text_to_equal("#error-message", "message: local error")
4144

4245
dash_duo.find_element("#start-global").click()
4346
dash_duo.wait_for_text_to_equal("#output-global", "global: global error")

0 commit comments

Comments
 (0)