MNT: Add brain_gc fixture to test_process_clim_plot#8575
MNT: Add brain_gc fixture to test_process_clim_plot#8575GuillaumeFavelier merged 2 commits intomne-tools:masterfrom
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.
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.
We keep an internal reference to mimic mayavi's behaviour when figure (int) is used.
There was a problem hiding this comment.
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 |
larsoner
left a comment
There was a problem hiding this comment.
LGTM feel free to merge once CIs are green @GuillaumeFavelier
This PR adds the
brain_gcfixture 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)