-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
MNT: Add brain_gc fixture to test_process_clim_plot #8575
MNT: Add brain_gc fixture to test_process_clim_plot #8575
Conversation
mne/viz/tests/test_3d.py
Outdated
# figure has been set so the internal ref needs to be clean to avoid | ||
# lingering VTK objects in memory | ||
if is_pyvista: | ||
renderer_interactive.backend._FIGURES.clear() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't fully understand -- doesn't this indicate that the close_all
that happens at the end of this test is somehow not working? How do we get a figure set/created in a way that our close-all fixture will not close it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We keep an internal reference to mimic mayavi
's behaviour when figure
(int) is used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See follow-up comment -- I think this means close_all
needs to be updated, or that we need to update our fixture to call another close_all
for the case of int-passing or something.
To put it differently, whenever you add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM feel free to merge once CIs are green @GuillaumeFavelier
This PR adds the
brain_gc
fixture intest_process_clim_plot
(I missed it in #8427) and fixes the issues with memory:It's also important for #8335 (that's how I discovered the issue in the first place)