File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 77#
88# License: Simplified BSD
99
10+ import gc
1011import os .path as op
1112from pathlib import Path
1213
@@ -646,12 +647,20 @@ def test_plot_vector_source_estimates():
646647 data = np .random .RandomState (0 ).rand (n_verts , 3 , n_time )
647648 stc = VectorSourceEstimate (data , vertices , 1 , 1 )
648649
649- stc .plot ('sample' , subjects_dir = subjects_dir )
650+ brain = stc .plot ('sample' , subjects_dir = subjects_dir )
651+ brain .close ()
652+ del brain
653+ gc .collect ()
650654
651655 with pytest .raises (ValueError , match = 'use "pos_lims"' ):
652656 stc .plot ('sample' , subjects_dir = subjects_dir ,
653657 clim = dict (pos_lims = [1 , 2 , 3 ]))
654- stc .plot ('sample' , subjects_dir = subjects_dir , hemi = 'both' )
658+ gc .collect ()
659+
660+ brain = stc .plot ('sample' , subjects_dir = subjects_dir , hemi = 'both' )
661+ brain .close ()
662+ del brain
663+ gc .collect ()
655664
656665
657666@testing .requires_testing_data
You can’t perform that action at this time.
0 commit comments