Skip to content

Commit

Permalink
MRG, MAINT: Fix PySurfer-related crash (#7295)
Browse files Browse the repository at this point in the history
* WIP: Try to fix crash

* WIP: Second try

* WIP: Remove PyVista

* FIX: Try another method
  • Loading branch information
larsoner authored Feb 10, 2020
1 parent 325bfc3 commit 9081ae3
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions mne/viz/tests/test_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#
# License: Simplified BSD

import gc
import os.path as op
from pathlib import Path

Expand Down Expand Up @@ -646,12 +647,20 @@ def test_plot_vector_source_estimates():
data = np.random.RandomState(0).rand(n_verts, 3, n_time)
stc = VectorSourceEstimate(data, vertices, 1, 1)

stc.plot('sample', subjects_dir=subjects_dir)
brain = stc.plot('sample', subjects_dir=subjects_dir)
brain.close()
del brain
gc.collect()

with pytest.raises(ValueError, match='use "pos_lims"'):
stc.plot('sample', subjects_dir=subjects_dir,
clim=dict(pos_lims=[1, 2, 3]))
stc.plot('sample', subjects_dir=subjects_dir, hemi='both')
gc.collect()

brain = stc.plot('sample', subjects_dir=subjects_dir, hemi='both')
brain.close()
del brain
gc.collect()


@testing.requires_testing_data
Expand Down

0 comments on commit 9081ae3

Please sign in to comment.