Exemplo n.º 1
0
 def test_publish_run_all_plugins(self):
     from ipypublish.scripts import export_plugins
     for plugin_name in export_plugins.get().keys():
         out_folder = tempfile.mkdtemp()
         try:
             publish(self.file1, outformat=plugin_name, outpath=out_folder)
         finally:
             shutil.rmtree(out_folder)
Exemplo n.º 2
0
    def test_publish_folder1_latex(self):

        out_folder = tempfile.mkdtemp()
        tex_path = os.path.join(out_folder, 'dir1.tex')
        try:
            publish(self.directory, outpath=out_folder)
            assert os.path.exists(tex_path)
        finally:
            shutil.rmtree(out_folder)
Exemplo n.º 3
0
    def test_publish_file1_slides(self):

        out_folder = tempfile.mkdtemp()
        html_path = os.path.join(out_folder, '2test.slides.html')
        try:
            publish(self.file1,
                    outformat='slides_ipypublish_main',
                    outpath=out_folder)
            assert os.path.exists(html_path)
        finally:
            shutil.rmtree(out_folder)
Exemplo n.º 4
0
    def test_publish_file1_pdf(self):

        out_folder = tempfile.mkdtemp()
        tex_path = os.path.join(out_folder, '2test.tex')
        pdf_path = os.path.join(out_folder, '2test.pdf')
        try:
            publish(self.file1, outpath=out_folder, create_pdf=True)
            assert os.path.exists(tex_path)
            assert os.path.exists(pdf_path)
        finally:
            shutil.rmtree(out_folder)