()
| 78 | |
| 79 | @pytest.fixture |
| 80 | def state_app(): |
| 81 | app = Dash(__name__) |
| 82 | app.layout = html.Div( |
| 83 | [ |
| 84 | html.Button(id="btn"), |
| 85 | dcc.Input(id="inp"), |
| 86 | html.Div(id="out"), |
| 87 | ] |
| 88 | ) |
| 89 | |
| 90 | @app.callback( |
| 91 | Output("out", "children"), |
| 92 | Input("btn", "n_clicks"), |
| 93 | State("inp", "value"), |
| 94 | ) |
| 95 | def update(clicks, val): |
| 96 | return val |
| 97 | |
| 98 | app_context.set(app) |
| 99 | app.mcp_callback_map = CallbackAdapterCollection(app) |
| 100 | return app |
| 101 | |
| 102 | |
| 103 | @pytest.fixture |
nothing calls this directly
no test coverage detected
searching dependent graphs…