Skip to content
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

Fixes AIO Callback testing with Dash-Duo #2062

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant