def test_binder_copy_files(sphinx_app_wrapper, tmpdir): """Test that notebooks are copied properly.""" from sphinx_gallery.binder import copy_binder_files sphinx_app = sphinx_app_wrapper.create_sphinx_app() gallery_conf = sphinx_app.config.sphinx_gallery_conf # Create requirements file with open(os.path.join(sphinx_app.srcdir, 'requirements.txt'), 'w'): pass copy_binder_files(sphinx_app, None) for i_file in ['plot_1', 'plot_2', 'plot_3']: assert os.path.exists(os.path.join( sphinx_app.outdir, 'ntbk_folder', gallery_conf['gallery_dirs'][0], i_file + '.ipynb'))
def test_binder_copy_files(sphinx_app_wrapper, tmpdir): """Test that notebooks are copied properly.""" from sphinx_gallery.binder import copy_binder_files sphinx_app = sphinx_app_wrapper.create_sphinx_app() gallery_conf = sphinx_app.config.sphinx_gallery_conf # Create requirements file with open(os.path.join(sphinx_app.srcdir, 'requirements.txt'), 'w'): pass copy_binder_files(sphinx_app, None) for i_file in ['plot_1', 'plot_2', 'plot_3']: assert os.path.exists(os.path.join( sphinx_app.outdir, 'ntbk_folder', gallery_conf['gallery_dirs'][0], i_file+'.ipynb'))