@@ -514,6 +514,28 @@ def test_add_bem_n_jobs(n_jobs, monkeypatch):
514514 assert 0.778 < corr < 0.80
515515
516516
517+ @pytest .mark .filterwarnings ("ignore:Distances could not be calculated.*:RuntimeWarning" )
518+ @pytest .mark .slowtest
519+ @testing .requires_testing_data
520+ def test_add_forward ():
521+ report = Report (subjects_dir = subjects_dir , image_format = "png" )
522+ report .add_forward (
523+ forward = fwd_fname ,
524+ subject = "sample" ,
525+ subjects_dir = subjects_dir ,
526+ title = "Forward solution" ,
527+ )
528+ assert len (report .html ) == 4
529+
530+ report = Report (subjects_dir = subjects_dir , image_format = "png" )
531+ report .add_forward (
532+ forward = fwd_fname ,
533+ subjects_dir = subjects_dir ,
534+ title = "Forward solution" ,
535+ )
536+ assert len (report .html ) == 1
537+
538+
517539@testing .requires_testing_data
518540def test_render_mri_without_bem (tmp_path ):
519541 """Test rendering MRI without BEM for mne report."""
@@ -882,6 +904,7 @@ def test_survive_pickle(tmp_path):
882904
883905@pytest .mark .slowtest # ~30 s on Azure Windows
884906@testing .requires_testing_data
907+ @pytest .mark .filterwarnings ("ignore:Distances could not be calculated.*:RuntimeWarning" )
885908def test_manual_report_2d (tmp_path , invisible_fig ):
886909 """Simulate user manually creating report by adding one file at a time."""
887910 pytest .importorskip ("sklearn" )
0 commit comments