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

Tests: set matplotlib backend locally too #2326

Merged
merged 1 commit into from
Sep 28, 2024

Conversation

adamjstewart
Copy link
Collaborator

The default matplotlib backend is interactive. In CI, this results in the tests hanging. Locally, this can result in the terminal losing focus. In CI, we worked around this by setting the MPLBACKEND environment variable. However, this doesn't solve the problem locally. This PR uses matplotlib.use instead, and works both locally and in CI.

Reference: https://matplotlib.org/stable/users/explain/figure/backends.html

@adamjstewart adamjstewart added this to the 0.6.1 milestone Sep 28, 2024
@github-actions github-actions bot added the testing Continuous integration testing label Sep 28, 2024
@calebrob6
Copy link
Member

Nice

@adamjstewart adamjstewart merged commit 742b900 into microsoft:main Sep 28, 2024
19 checks passed
@adamjstewart adamjstewart deleted the tests/matplotlib branch September 28, 2024 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Continuous integration testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants