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

Change matplotlib backend for unit tests #645

Merged
merged 5 commits into from
Nov 7, 2023

Conversation

roje-bodc
Copy link
Collaborator

This fix has been created in order to avoid a threading issue when running the unit tests. It is caused by using the matplotlib gui backend outside of the main thread (I believe due to the use of subtests).

The fix is to use a non-interactive backend when running the unit tests.

An example of the error is:

image

The fix is also mentioned here:
https://stackoverflow.com/questions/52839758/matplotlib-and-runtimeerror-main-thread-is-not-in-main-loop

@roje-bodc
Copy link
Collaborator Author

@jpolton I have created this pull request as a fix for the matplotlib threading error within the unit tests.

@jpolton
Copy link
Collaborator

jpolton commented Nov 7, 2023

Fantastic. I thought the solution would be far more troublesome. Well done @roje-bodc

@jpolton jpolton merged commit 06d256a into develop Nov 7, 2023
@jpolton jpolton deleted the feature/matplotlib-backend-fix branch November 7, 2023 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Merged to Develop
Development

Successfully merging this pull request may close these issues.

2 participants