MNT: use brain_gc fixture in some tests#8427
Conversation
mne/viz/tests/test_3d.py
Outdated
| these_kwargs = kwargs.copy() | ||
| these_kwargs.pop('src') | ||
| meth(**these_kwargs) | ||
| renderer_interactive.backend._close_all() |
There was a problem hiding this comment.
Rather than do this, how about we just have both renderer_interactive and brain_gc call this after their yield steps? Calling it more than once should be fine, and having it in both means we shouldn't need to worry about order.
There was a problem hiding this comment.
Sure, I'll see if this solves the need to the intermediate calls too
|
There is indeed a difference between pinned and latest versions. I'll come back to 908c1d2 when new versions are released. For now, some adjustments are necessary here. |
For me, it did the trick locally, thanks 👍 Actually there is another strategy: waiting for a new release of pyvista before merging this. Since it's not high priority, I think we can afford to wait. |
|
I would
There is a a slight problem, though, that PyVista is currently at 0.26.0 for some reason. I'll open a PR to fix this, it's weird. |
| import pyvista | ||
| if LooseVersion(pyvista.__version__) <= LooseVersion('0.26.1'): |
There was a problem hiding this comment.
| import pyvista | |
| if LooseVersion(pyvista.__version__) <= LooseVersion('0.26.1'): | |
| if not check_version('pyvista', '0.26.1'): |
There was a problem hiding this comment.
... but things are green so let's just do this later. Thanks @GuillaumeFavelier !
This PR adds the
brain_gcfixture in remaining 3d viz tests.Closes #8403
I ran the tests locally using master versions of
pyvistaandpyvistaqt. Maybe some adjustments are necessary.