def test_add_slider_to_section():
    'Test adding a slider with a series of images to mne report.'
    tempdir = _TempDir()
    report = Report(info_fname=raw_fname, subject='sample', subjects_dir=subjects_dir)
    section = 'slider_section'
    figs = _get_example_figures()
    report.add_slider_to_section(figs, section=section, title='my title')
    assert (report.fnames[0] == 'my title-#-report_slider_section-#-custom')
    report.save(op.join(tempdir, 'report.html'), open_browser=False)
    pytest.raises(NotImplementedError, report.add_slider_to_section, [figs, figs])
    pytest.raises(ValueError, report.add_slider_to_section, figs, ['wug'])
    pytest.raises(TypeError, report.add_slider_to_section, figs, 'wug')
    pytest.raises(ValueError, report.add_slider_to_section, figs[:1], 'wug')
    report = Report()
    (fig, ax) = plt.subplots()
    ax.set_xlabel(u'μ')
    report.add_slider_to_section(([fig] * 2), image_format='svg')
Test adding a slider with a series of images to mne report.
def test_add_slider_to_section():
    
    tempdir = _TempDir()
    report = Report(info_fname=raw_fname, subject='sample', subjects_dir=subjects_dir)
    section = 'slider_section'
    figs = _get_example_figures()
    report.add_slider_to_section(figs, section=section, title='my title')
    assert (report.fnames[0] == 'my title-#-report_slider_section-#-custom')
    report.save(op.join(tempdir, 'report.html'), open_browser=False)
    pytest.raises(NotImplementedError, report.add_slider_to_section, [figs, figs])
    pytest.raises(ValueError, report.add_slider_to_section, figs, ['wug'])
    pytest.raises(TypeError, report.add_slider_to_section, figs, 'wug')
    pytest.raises(ValueError, report.add_slider_to_section, figs[:1], 'wug')
    report = Report()
    (fig, ax) = plt.subplots()
    ax.set_xlabel(u'μ')
    report.add_slider_to_section(([fig] * 2), image_format='svg')