#NEWLINE# def test_add_slider_to_section( ) : #NEWLINE# #INDENT# 'Test adding a slider with a series of images to mne report.\n    ' #NEWLINE# tempdir = _TempDir ( ) #NEWLINE# from matplotlib import pyplot as plt #NEWLINE# report = Report ( info_fname = raw_fname , subject = 'sample' , subjects_dir = subjects_dir ) #NEWLINE# section = 'slider_section' #NEWLINE# figs = list ( ) #NEWLINE# figs . append ( plt . figure ( ) ) #NEWLINE# plt . plot ( [ 1 , 2 , 3 ] ) #NEWLINE# plt . close ( 'all' ) #NEWLINE# figs . append ( plt . figure ( ) ) #NEWLINE# plt . plot ( [ 3 , 2 , 1 ] ) #NEWLINE# plt . close ( 'all' ) #NEWLINE# report . add_slider_to_section ( figs , section = section ) #NEWLINE# report . save ( op . join ( tempdir , 'report.html' ) , open_browser = False ) #NEWLINE# assert_raises ( NotImplementedError , tempdir . add_slider_to_section , [ figs , figs ] ) #NEWLINE# assert_raises ( ValueError , report . add_slider_to_section , figs , [ 'wug' ] ) #NEWLINE# assert_raises ( TypeError , report . add_slider_to_section , figs , 'wug' )