Skip to content

Commit db284ad

Browse files
fix existing tests now that input/output overlap is legal
1 parent bd2b236 commit db284ad

File tree

1 file changed

+4
-29
lines changed

1 file changed

+4
-29
lines changed

tests/integration/devtools/test_callback_validation.py

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import dash_html_components as html
66
from dash import Dash
77
from dash.dependencies import Input, Output, State, MATCH, ALL, ALLSMALLER
8+
from dash.testing import wait
89

910
debugging = dict(
1011
debug=True, use_reloader=False, use_debugger=True, dev_tools_hot_reload=False
@@ -91,9 +92,7 @@ def x(a):
9192

9293
dash_duo.start_server(app, **debugging)
9394

94-
# the first one is just an artifact... the other 4 we care about
9595
specs = [
96-
["Same `Input` and `Output`", []],
9796
[
9897
"Callback item missing ID",
9998
['Input[0].id = ""', "Every item linked to a callback needs an ID"],
@@ -252,33 +251,9 @@ def y2(c):
252251

253252
dash_duo.start_server(app, **debugging)
254253

255-
specs = [
256-
[
257-
"Same `Input` and `Output`",
258-
[
259-
'Input 0 ({"b":MATCH,"c":1}.children)',
260-
"can match the same component(s) as",
261-
'Output 1 ({"b":MATCH,"c":1}.children)',
262-
],
263-
],
264-
[
265-
"Same `Input` and `Output`",
266-
[
267-
'Input 0 ({"a":1}.children)',
268-
"can match the same component(s) as",
269-
'Output 0 ({"a":ALL}.children)',
270-
],
271-
],
272-
[
273-
"Same `Input` and `Output`",
274-
["Input 0 (c.children)", "matches Output 1 (c.children)"],
275-
],
276-
[
277-
"Same `Input` and `Output`",
278-
["Input 0 (a.children)", "matches Output 0 (a.children)"],
279-
],
280-
]
281-
check_errors(dash_duo, specs)
254+
# input/output overlap is now legal, shouldn't throw any errors
255+
wait.until(lambda: ~dash_duo.redux_state_is_loading, 2)
256+
assert dash_duo.get_logs() == []
282257

283258

284259
def test_dvcv006_inconsistent_wildcards(dash_duo):

0 commit comments

Comments
 (0)