Skip to content

Fixes AIO Callback testing with Dash-Duo#2062

Open
MrTeale wants to merge 2 commits into
plotly:devfrom
MrTeale:fix-1933-AIO-dash-duo
Open

Fixes AIO Callback testing with Dash-Duo#2062
MrTeale wants to merge 2 commits into
plotly:devfrom
MrTeale:fix-1933-AIO-dash-duo

Conversation

@MrTeale

@MrTeale MrTeale commented May 23, 2022

Copy link
Copy Markdown
Contributor

This PR fixes #1933. The AIO components are unable to be tested using Pytest and the Dash-Duo object. The callbacks set via dash.callback (rather than app.callback) are added to a global map that is cleared after the first instance of dash.Dash._setup_server.

To get around this, I'm currently exploring whether it is possible to leave the GLOBAL_CALLBACK_MAP and GLOBAL_CALLBACK_LIST populated rather than clearing them on setup.

Contributor Checklist

  • I have broken down my PR scope into the following TODO tasks
  • I have run the tests locally and they passed. (refer to testing section in contributing)
  • I have added entry in the CHANGELOG.md

@MrTeale

MrTeale commented May 23, 2022

Copy link
Copy Markdown
Contributor Author

Turns out it is possible to not remove them from the GLOBAL_CALLBACK_MAP and clear the GLOBAL_CALLBACK_LIST and everything work fine.

Was there any particular reasoning as to removing them the way they were?

@MrTeale MrTeale marked this pull request as ready for review May 23, 2022 09:25
@MrTeale MrTeale requested a review from alexcjohnson as a code owner May 23, 2022 09:25
@gvwilson gvwilson self-assigned this Jul 24, 2024
@gvwilson gvwilson removed their assignment Aug 2, 2024
@gvwilson gvwilson added P2 considered for next cycle fix fixes something broken community community contribution labels Aug 13, 2024
@gvwilson gvwilson requested a review from T4rk1n August 22, 2024 14:37
@gvwilson

Copy link
Copy Markdown
Contributor

@T4rk1n can you please have a look at this at some point in cycle 17? thanks - @gvwilson

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community community contribution fix fixes something broken P2 considered for next cycle

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dash_duo does not work with All-in-One components

3 participants