Ejemplo n.º 1
0
    def test_sphinx_ext_video_latex(self):
        fLOG(__file__,
             self._testMethodName,
             OutputPrint=__name__ == "__main__")

        temp = get_temp_folder(__file__, "temp_sphinx_ext_video_latex")

        fLOG('custom app init')
        src_ = self.setup_format(temp)
        app = CustomSphinxApp(src_, temp, buildername="latex")
        fLOG('custom app build')
        app.build()
        fLOG('custom app done')

        index = os.path.join(temp, "pyq-video.tex")
        self.assertExists(index)
        with open(index, "r", encoding="utf-8") as f:
            content = f.read()
        self.assertNotIn("unable to find", content)
        self.assertIn('mur.mp4}', content)
        index = os.path.join(temp, "mur.mp4")
        self.assertExists(index)
        index = os.path.join(temp, "jol", "mur2.mp4")
        self.assertExists(index)
        index = os.path.join(temp, "jol", 'im', "mur3.mp4")
        self.assertExists(index)

        if is_travis_or_appveyor() not in ('travis', 'appveyor'):
            latex = find_latex_path()
            fLOG("latex-compile", latex)
            compile_latex_output_final(temp, latex, doall=True)
            fLOG("compilatione done")
            index = os.path.join(temp, "pyq-video.pdf")
            self.assertExists(index)
Ejemplo n.º 2
0
    def test_sphinx_ext_video_latex(self):
        fLOG(
            __file__,
            self._testMethodName,
            OutputPrint=__name__ == "__main__")

        temp = get_temp_folder(__file__, "temp_sphinx_ext_video_latex")

        fLOG('custom app init')
        src_ = self.setup_format(temp)
        app = CustomSphinxApp(src_, temp, buildername="latex")
        fLOG('custom app build')
        app.build()
        fLOG('custom app done')

        index = os.path.join(temp, "pyq-video.tex")
        self.assertExists(index)
        with open(index, "r", encoding="utf-8") as f:
            content = f.read()
        self.assertNotIn("unable to find", content)
        self.assertIn('mur.mp4}', content)
        index = os.path.join(temp, "mur.mp4")
        self.assertExists(index)
        index = os.path.join(temp, "jol", "mur2.mp4")
        self.assertExists(index)
        index = os.path.join(temp, "jol", 'im', "mur3.mp4")
        self.assertExists(index)

        if is_travis_or_appveyor() not in ('travis', 'appveyor'):
            latex = find_latex_path()
            fLOG("latex-compile", latex)
            compile_latex_output_final(temp, latex, doall=True)
            fLOG("compilatione done")
            index = os.path.join(temp, "pyq-video.pdf")
            self.assertExists(index)
Ejemplo n.º 3
0
    def test_app_sphinx_custom(self):
        fLOG(__file__,
             self._testMethodName,
             OutputPrint=__name__ == "__main__")

        temp = get_temp_folder(__file__, "temp_app_sphinx_custom")
        src_ = os.path.join(temp, "..", "data", "doc")

        app = CustomSphinxApp(src_, temp)
        app.build()
Ejemplo n.º 4
0
    def test_app_sphinx_custom(self):
        fLOG(
            __file__,
            self._testMethodName,
            OutputPrint=__name__ == "__main__")

        temp = get_temp_folder(__file__, "temp_app_sphinx_custom")
        src_ = os.path.join(temp, "..", "data", "doc")

        app = CustomSphinxApp(src_, temp)
        app.build()
Ejemplo n.º 5
0
    def test_app_sphinx(self):
        fLOG(__file__,
             self._testMethodName,
             OutputPrint=__name__ == "__main__")

        temp = get_temp_folder(__file__, "temp_app_sphinx")
        src_ = os.path.join(temp, "..", "data", "doc")

        app = CustomSphinxApp(src_, temp)
        app.build()
        # app.cleanup()

        index = os.path.join(temp, "index.html")
        self.assertExists(index)
    def test_sphinx_ext_thumbnail_html(self):
        fLOG(__file__,
             self._testMethodName,
             OutputPrint=__name__ == "__main__")

        temp = get_temp_folder(__file__, "temp_sphinx_ext_thumbnail_html")
        src_ = os.path.join(temp, "..", "data", "image")

        app = CustomSphinxApp(src_, temp)
        app.build()

        index = os.path.join(temp, "index.html")
        self.assertExists(index)
        img = os.path.join(temp, '_images', 'im.png')
        self.assertExists(img)
Ejemplo n.º 7
0
    def test_app_sphinx(self):
        fLOG(
            __file__,
            self._testMethodName,
            OutputPrint=__name__ == "__main__")

        temp = get_temp_folder(__file__, "temp_app_sphinx")
        src_ = os.path.join(temp, "..", "data", "doc")

        app = CustomSphinxApp(src_, temp)
        app.build()
        # app.cleanup()

        index = os.path.join(temp, "index.html")
        self.assertExists(index)
    def test_sphinx_ext_thumbnail_html(self):
        fLOG(
            __file__,
            self._testMethodName,
            OutputPrint=__name__ == "__main__")

        temp = get_temp_folder(__file__, "temp_sphinx_ext_thumbnail_html")
        src_ = os.path.join(temp, "..", "data", "image")

        app = CustomSphinxApp(src_, temp)
        app.build()

        index = os.path.join(temp, "index.html")
        self.assertExists(index)
        img = os.path.join(temp, '_images', 'im.png')
        self.assertExists(img)
Ejemplo n.º 9
0
    def test_sphinx_ext_image_html(self):
        fLOG(__file__,
             self._testMethodName,
             OutputPrint=__name__ == "__main__")

        temp = get_temp_folder(__file__, "temp_sphinx_ext_image_html")
        src_ = os.path.join(temp, "..", "data", "image")

        # Following warning is due to nbconvert.
        # DeprecationWarning: `nbconvert.exporters.exporter_locator` is deprecated
        # in favor of `nbconvert.exporters.base` since nbconvert 5.0.
        app = CustomSphinxApp(src_, temp)
        with warnings.catch_warnings():
            warnings.simplefilter("ignore", DeprecationWarning)
            app.build()

        index = os.path.join(temp, "index.html")
        self.assertExists(index)
        img = os.path.join(temp, '_images', 'im.png')
        self.assertExists(img)
Ejemplo n.º 10
0
    def test_sphinx_ext_image_html(self):
        fLOG(
            __file__,
            self._testMethodName,
            OutputPrint=__name__ == "__main__")

        temp = get_temp_folder(__file__, "temp_sphinx_ext_image_html")
        src_ = os.path.join(temp, "..", "data", "image")

        # Following warning is due to nbconvert.
        # DeprecationWarning: `nbconvert.exporters.exporter_locator` is deprecated
        # in favor of `nbconvert.exporters.base` since nbconvert 5.0.
        app = CustomSphinxApp(src_, temp)
        with warnings.catch_warnings():
            warnings.simplefilter("ignore", DeprecationWarning)
            app.build()

        index = os.path.join(temp, "index.html")
        self.assertExists(index)
        img = os.path.join(temp, '_images', 'im.png')
        self.assertExists(img)
Ejemplo n.º 11
0
    def test_sphinx_ext_video_text(self):
        fLOG(__file__,
             self._testMethodName,
             OutputPrint=__name__ == "__main__")

        temp = get_temp_folder(__file__, "temp_sphinx_ext_video_text")
        src_ = self.setup_format(temp)
        app = CustomSphinxApp(src_, temp, buildername="text")
        app.build()

        index = os.path.join(temp, "index.txt")
        self.assertExists(index)
        with open(index, "r", encoding="utf-8") as f:
            content = f.read()
        self.assertNotIn("unable to find", content)
        self.assertIn('mur.mp4', content)
        index = os.path.join(temp, "mur.mp4")
        self.assertExists(index)
        index = os.path.join(temp, "jol", "mur2.mp4")
        self.assertExists(index)
        index = os.path.join(temp, "jol", 'im', "mur3.mp4")
        self.assertExists(index)
Ejemplo n.º 12
0
    def test_sphinx_ext_video_text(self):
        fLOG(
            __file__,
            self._testMethodName,
            OutputPrint=__name__ == "__main__")

        temp = get_temp_folder(__file__, "temp_sphinx_ext_video_text")
        src_ = self.setup_format(temp)
        app = CustomSphinxApp(src_, temp, buildername="text")
        app.build()

        index = os.path.join(temp, "index.txt")
        self.assertExists(index)
        with open(index, "r", encoding="utf-8") as f:
            content = f.read()
        self.assertNotIn("unable to find", content)
        self.assertIn('mur.mp4', content)
        index = os.path.join(temp, "mur.mp4")
        self.assertExists(index)
        index = os.path.join(temp, "jol", "mur2.mp4")
        self.assertExists(index)
        index = os.path.join(temp, "jol", 'im', "mur3.mp4")
        self.assertExists(index)