Esempio n. 1
0
    def test_notebook_latex_problems(self):
        fLOG(
            __file__,
            self._testMethodName,
            OutputPrint=__name__ == "__main__")
        path = os.path.abspath(os.path.split(__file__)[0])
        fold = os.path.normpath(os.path.join(
            path, "..", "..", "_doc", "notebooks", "td2a_ml"))
        nbs = [os.path.join(fold, _)
               for _ in os.listdir(fold) if _.endswith(".ipynb") and "problems" in _]
        nbs.sort()
        print(nbs)
        formats = ["pdf", "ipynb", "html", "python", "rst", "docx"]

        if is_travis_or_appveyor() is not None:
            warnings.warn(
                "travis, appveyor, unable to test %s" % self._testMethodName)
            return

        temp = get_temp_folder(__file__, "temp_nb_td2A_ml_bug_latex")

        res = process_notebooks(nbs, temp, temp, formats=formats)
        fLOG("*****", len(res))
        for _ in res:
            fLOG(_)
            assert os.path.exists(_[0])
Esempio n. 2
0
    def test_notebook_latex1(self):
        fLOG(__file__,
             self._testMethodName,
             OutputPrint=__name__ == "__main__")

        path = os.path.abspath(os.path.split(__file__)[0])
        nbfold = os.path.normpath(
            os.path.join(path, "..", "..", "_doc", "notebooks"))
        nbs = [
            os.path.join(nbfold, "notebook_eleves", "2014-2015",
                         "2015_kmeans.ipynb"),
            # os.path.join(nbfold, "notebook_eleves", "2014_2015", "2015_page_rank.ipynb"),
            # os.path.join(nbfold, "notebook_eleves", "2014_2015", "2015_factorisation_matrice.ipynb"),
        ]

        formats = [
            "pdf",
        ]

        temp = get_temp_folder(__file__, "temp_nb_bug_latex1")

        if is_travis_or_appveyor():
            warnings.warn(
                "travis or appveyor, unable to test TestNoteBooksBugLatex_ecs.test_notebook_latex1"
            )
            return

        res = process_notebooks(nbs, temp, temp, formats=formats)
        fLOG("*****", len(res))
        for _ in res:
            fLOG(_)
            assert os.path.exists(_[0])
Esempio n. 3
0
    def test_notebook_latex_problems(self):
        fLOG(__file__,
             self._testMethodName,
             OutputPrint=__name__ == "__main__")
        path = os.path.abspath(os.path.split(__file__)[0])
        fold = os.path.normpath(
            os.path.join(path, "..", "..", "_doc", "notebooks", "td2a_ml"))
        nbs = [
            os.path.join(fold, _) for _ in os.listdir(fold)
            if _.endswith(".ipynb") and "problems" in _
        ]
        nbs.sort()
        formats = ["pdf", "ipynb", "html", "python", "rst", "docx"]

        if is_travis_or_appveyor() is not None:
            warnings.warn("travis, appveyor, unable to test %s" %
                          self._testMethodName)
            return

        temp = get_temp_folder(__file__, "temp_nb_td2A_ml_bug_latex")

        res = process_notebooks(nbs, temp, temp, formats=formats)
        fLOG("*****", len(res))
        for _ in res:
            fLOG(_)
            self.assertTrue(os.path.exists(_[0]))
Esempio n. 4
0
    def test_notebook_latex_problems(self):
        fLOG(__file__,
             self._testMethodName,
             OutputPrint=__name__ == "__main__")
        path = os.path.abspath(os.path.split(__file__)[0])
        fold = os.path.normpath(
            os.path.join(path, "..", "..", "_doc", "notebooks", "td2a_eco"))
        nbs = [
            os.path.join(fold, _) for _ in os.listdir(fold)
            if _.endswith(".ipynb") and "TD2A_eco_API_SNCF_corrige" in _
        ]
        nbs.sort()
        formats = ["pdf", "ipynb", "html", "python", "rst"]

        temp = get_temp_folder(__file__, "temp_nb_td2A_eco_bug_latex2")

        res = process_notebooks(nbs, temp, temp, formats=formats)
        fLOG("*****", len(res))
        for _ in res:
            fLOG(_)
            self.assertTrue(os.path.exists(_[0]))
    def test_notebook_html_problems(self):
        fLOG(
            __file__,
            self._testMethodName,
            OutputPrint=__name__ == "__main__")
        path = os.path.abspath(os.path.split(__file__)[0])
        fold = os.path.normpath(os.path.join(
            path, "..", "..", "_doc", "notebooks", "td2a_eco2"))
        nbs = [os.path.join(fold, _)
               for _ in os.listdir(fold) if _.endswith(".ipynb") and "pocket" in _ and "correction" in _]
        nbs.sort()
        if len(nbs) == 0:
            raise ValueError("No notebooks")
        formats = ["pdf", "ipynb", "html", "python", "rst"]

        temp = get_temp_folder(__file__, "temp_nb_td2A_eco2_bug_html")

        res = process_notebooks(nbs, temp, temp, formats=formats)
        fLOG("*****", len(res))
        for _ in res:
            fLOG(_)
            self.assertTrue(os.path.exists(_[0]))
    def test_notebook_latex1(self):
        fLOG(__file__, self._testMethodName, OutputPrint=__name__ == "__main__")

        path = os.path.abspath(os.path.split(__file__)[0])
        nbfold = os.path.normpath(os.path.join(path, "..", "..", "_doc", "notebooks"))
        nbs = [
            os.path.join(nbfold, "notebook_eleves", "2014_2015", "2015_kmeans.ipynb"),
            # os.path.join(nbfold, "notebook_eleves", "2014_2015", "2015_page_rank.ipynb"),
            # os.path.join(nbfold, "notebook_eleves", "2014_2015", "2015_factorisation_matrice.ipynb"),
        ]

        formats = ["pdf"]

        temp = get_temp_folder(__file__, "temp_nb_bug_latex1")

        if is_travis_or_appveyor():
            warnings.warn("travis or appveyor, unable to test TestNoteBooksBugLatex_ecs.test_notebook_latex1")
            return

        res = process_notebooks(nbs, temp, temp, formats=formats)
        fLOG("*****", len(res))
        for _ in res:
            fLOG(_)
            assert os.path.exists(_[0])