Skip to content

Importing plotly express may fail over its fiddling of the globals object #3670

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

Closed
matanox opened this issue Apr 8, 2022 · 5 comments · Fixed by #3713
Closed

Importing plotly express may fail over its fiddling of the globals object #3670

matanox opened this issue Apr 8, 2022 · 5 comments · Fixed by #3713

Comments

@matanox
Copy link

matanox commented Apr 8, 2022

As detailed here on StackOverflow there is an interoperability corner case when using pytest, where importing plotly express may fail over this line of code.

@matanox
Copy link
Author

matanox commented May 6, 2022

I wonder if other people were able to import plotly express inside pytest managed test code at all.

@nicolaskruchten
Copy link
Contributor

Yeah, this globals thing was pretty lazy. It should be fairly mechanical to fix if someone wants to open a PR though! Basically we just add the _r-suffixed scale after each scale.

@nicolaskruchten
Copy link
Contributor

That said, yes, we use pytest to test Plotly Express, both locally and in CI.

@nicolaskruchten
Copy link
Contributor

OK so #3713 should resolve whatever issue you're hitting that I'm not. Even if I can't replicate it, it's good to get rid of this kind of code smell :)

@matanox
Copy link
Author

matanox commented Mar 21, 2023

Thank you so much for solving this, pytest interoperability is straight now.

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

Successfully merging a pull request may close this issue.

2 participants