当前位置: 首页>>代码示例>>Python>>正文


Python notebook_test_helper.unittest_raise_exception_notebook函数代码示例

本文整理汇总了Python中src.ensae_teaching_cs.automation.notebook_test_helper.unittest_raise_exception_notebook函数的典型用法代码示例。如果您正苦于以下问题:Python unittest_raise_exception_notebook函数的具体用法?Python unittest_raise_exception_notebook怎么用?Python unittest_raise_exception_notebook使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了unittest_raise_exception_notebook函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_notebook_runner

 def test_notebook_runner(self):
     fLOG(__file__, self._testMethodName, OutputPrint=__name__ == "__main__")
     temp = get_temp_folder(__file__, "temp_notebook2a_1")
     keepnote = ls_notebooks("td2a")
     assert len(keepnote) > 0
     res = execute_notebooks(temp, keepnote, lambda i, n: "_1" in n, fLOG=fLOG)
     unittest_raise_exception_notebook(res, fLOG)
开发者ID:vincentCGI,项目名称:ensae_teaching_cs,代码行数:7,代码来源:test_notebook_2a_1.py

示例2: test_notebook_runner_2a_long

    def test_notebook_runner_2a_long(self):
        fLOG(
            __file__,
            self._testMethodName,
            OutputPrint=__name__ == "__main__")

        if "travis" in sys.executable:
            # skip travis and R
            warnings.warn(
                "travis, unable to test TestNotebookRunner2a_long.test_notebook_runner_2a_long")
            return

        if "R_HOME" not in os.environ or not os.path.exists(os.environ["R_HOME"]):
            paths = [r"C:\Program Files\R\R-3.2.2",
                     r"C:\Program Files\R\R-3.1.2"]
            for path in paths:
                if os.path.exists(path):
                    os.environ["R_HOME"] = path
                    break

        temp = get_temp_folder(__file__, "temp_notebook2a_long_")
        keepnote = ls_notebooks("2a")
        assert len(keepnote) > 0
        res = execute_notebooks(temp, keepnote,
                                lambda i, n: "python_r" in n,
                                fLOG=fLOG,
                                clean_function=clean_function_1a)
        unittest_raise_exception_notebook(res, fLOG)
开发者ID:vincentCGI,项目名称:ensae_teaching_cs,代码行数:28,代码来源:test_LONG_notebook_2a_long.py

示例3: test_notebook_runner_exams

 def test_notebook_runner_exams(self):
     fLOG(
         __file__,
         self._testMethodName,
         OutputPrint=__name__ == "__main__")
     temp = get_temp_folder(__file__, "temp_notebookexams_")
     keepnote = ls_notebooks("exams")
     assert len(keepnote) > 0
     res = execute_notebooks(temp, keepnote,
                             lambda i, n: "git" not in n and "interro_rapide_20_minutes_2014_11" not in n,
                             fLOG=fLOG,
                             clean_function=clean_function_1a)
     unittest_raise_exception_notebook(res, fLOG)
开发者ID:xugonglei,项目名称:ensae_teaching_cs,代码行数:13,代码来源:test_notebook_exams.py

示例4: test_notebook_runner_1a

 def test_notebook_runner_1a(self):
     fLOG(
         __file__,
         self._testMethodName,
         OutputPrint=__name__ == "__main__")
     temp = get_temp_folder(__file__, "temp_notebook1a_")
     keepnote = ls_notebooks("1a")
     assert len(keepnote) > 0
     res = execute_notebooks(temp, keepnote,
                             lambda i, n: "deviner" not in n,
                             fLOG=fLOG,
                             clean_function=clean_function_1a)
     unittest_raise_exception_notebook(res, fLOG)
开发者ID:xugonglei,项目名称:ensae_teaching_cs,代码行数:13,代码来源:test_notebook_1a.py

示例5: test_notebook_runner_correction_11

 def test_notebook_runner_correction_11(self):
     fLOG(
         __file__,
         self._testMethodName,
         OutputPrint=__name__ == "__main__")
     temp = get_temp_folder(__file__, "temp_notebook1a_correction_11")
     keepnote = ls_notebooks("td1a")
     assert len(keepnote) > 0
     res = execute_notebooks(temp, keepnote,
                             lambda i, n: "correction_session_11" in n,
                             fLOG=fLOG,
                             clean_function=TestNotebookRunner1a_correction_11.clean_function)
     unittest_raise_exception_notebook(res, fLOG)
开发者ID:vincentCGI,项目名称:ensae_teaching_cs,代码行数:13,代码来源:test_notebook_1a_correction_11.py

示例6: test_notebook_runner_exposelong3

 def test_notebook_runner_exposelong3(self):
     fLOG(
         __file__,
         self._testMethodName,
         OutputPrint=__name__ == "__main__")
     temp = get_temp_folder(__file__, "temp_notebookexposelong3_")
     keepnote = ls_notebooks("expose")
     assert len(keepnote) > 0
     res = execute_notebooks(temp, keepnote,
                             lambda i, n: "mortalite" in n,
                             fLOG=fLOG,
                             deepfLOG=fLOG if __name__ == "__main__" else noLOG,
                             clean_function=clean_function_1a)
     unittest_raise_exception_notebook(res, fLOG)
开发者ID:vincentCGI,项目名称:ensae_teaching_cs,代码行数:14,代码来源:test_LONG_notebook_expose_long3.py

示例7: test_notebook_runner_expose1

 def test_notebook_runner_expose1(self):
     fLOG(
         __file__,
         self._testMethodName,
         OutputPrint=__name__ == "__main__")
     temp = get_temp_folder(__file__, "temp_notebookexpose1_")
     keepnote = ls_notebooks("expose")
     assert len(keepnote) > 0
     res = execute_notebooks(temp, keepnote,
                             lambda i, n: "velib" not in n and "paris_parcours" not in n
                             and "ml_table_mortalite" not in n,
                             fLOG=fLOG,
                             clean_function=clean_function_1a)
     unittest_raise_exception_notebook(res, fLOG)
开发者ID:xugonglei,项目名称:ensae_teaching_cs,代码行数:14,代码来源:test_notebook_expose1.py

示例8: test_notebook_runner_enonce_1_7

    def test_notebook_runner_enonce_1_7(self):
        fLOG(
            __file__,
            self._testMethodName,
            OutputPrint=__name__ == "__main__")
        temp = get_temp_folder(__file__, "temp_notebook1a_enonce_1_7")
        keepnote = ls_notebooks("td1a")
        assert len(keepnote) > 0

        res = execute_notebooks(temp, keepnote,
                                lambda i, n: "_12" not in n
                                and "cenonce_session1." not in n
                                and "cenonce_session6." not in n
                                and "cenonce_session8." not in n
                                and "cenonce_session9." not in n
                                and "cenonce_session_10." not in n
                                and "cenonce_session_11." not in n
                                and "enonce" in n,
                                fLOG=fLOG,
                                clean_function=clean_function_1a)
        unittest_raise_exception_notebook(res, fLOG)
开发者ID:xugonglei,项目名称:ensae_teaching_cs,代码行数:21,代码来源:test_notebook_1a_enonce_1_7.py

示例9: test_notebook_runner_correction_9_10

 def test_notebook_runner_correction_9_10(self):
     fLOG(__file__, self._testMethodName, OutputPrint=__name__ == "__main__")
     temp = get_temp_folder(__file__, "temp_notebook1a_correction_9_10")
     keepnote = ls_notebooks("td1a")
     assert len(keepnote) > 0
     res = execute_notebooks(
         temp,
         keepnote,
         lambda i, n: "_12" not in n
         and "session1." not in n
         and "session2." not in n
         and "session3." not in n
         and "session4." not in n
         and "session5." not in n
         and "session6." not in n
         and "session7." not in n
         and "session8." not in n
         and "session_11." not in n
         and "correction" in n,
         fLOG=fLOG,
         clean_function=clean_function_1a,
     )
     unittest_raise_exception_notebook(res, fLOG)
开发者ID:vincentCGI,项目名称:ensae_teaching_cs,代码行数:23,代码来源:test_notebook_1a_correction_9_10.py

示例10: test_notebook_runner

    def test_notebook_runner(self):
        fLOG(
            __file__,
            self._testMethodName,
            OutputPrint=__name__ == "__main__")

        # this notebook describes how to distribute the work with multiple processors
        # it requires to start multiple clusters first (a command line)
        # and to stop them afterwards
        # it still needs to be implemented
        # we skip !
        warnings.warn(
            "TODO: implement a unit test testing the distribution on multiple processors")
        return

        temp = get_temp_folder(__file__, "temp_notebook2a_2_enonce_2D")
        keepnote = ls_notebooks("td2a")
        assert len(keepnote) > 0
        res = execute_notebooks(temp, keepnote, lambda i, n: "_2" in n
                                and "enonce" in n
                                and "_2D" in n,
                                fLOG=fLOG, clean_function=clean_function_1a)
        unittest_raise_exception_notebook(res, fLOG)
开发者ID:vincentCGI,项目名称:ensae_teaching_cs,代码行数:23,代码来源:test_notebook_2a_2_enonce_2d.py


注:本文中的src.ensae_teaching_cs.automation.notebook_test_helper.unittest_raise_exception_notebook函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。