Skip to content

Fixes AIO Callback testing with Dash-Duo #2062

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

MrTeale
Copy link
Contributor

@MrTeale MrTeale commented May 23, 2022

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
Copy link
Contributor Author

MrTeale commented May 23, 2022

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
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