Skip to content

Commit 302f44c

Browse files
committed
test for wrapped vs unwrapped single output callback
1 parent 473895e commit 302f44c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

tests/integration/callbacks/test_validation.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,3 +110,22 @@ def multi2(a):
110110
]
111111
multi2("aaa", outputs_list=outputs_list)
112112
pytest.fail("wrong-length list")
113+
114+
115+
def test_cbva003_list_single_output(dash_duo):
116+
app = Dash(__name__)
117+
app.layout = html.Div(
118+
[html.Div("Hi", id="in"), html.Div(id="out1"), html.Div(id="out2"),]
119+
)
120+
121+
@app.callback(Output("out1", "children"), Input("in", "children"))
122+
def o1(i):
123+
return "1: " + i
124+
125+
@app.callback([Output("out2", "children")], [Input("in", "children")])
126+
def o2(i):
127+
return ("2: " + i,)
128+
129+
dash_duo.start_server(app)
130+
dash_duo.wait_for_text_to_equal("#out1", "1: Hi")
131+
dash_duo.wait_for_text_to_equal("#out2", "2: Hi")

0 commit comments

Comments
 (0)