Permalink
Browse files

move one notebook to LONG series

  • Loading branch information...
sdpython committed Dec 29, 2017
1 parent 4a7e8d0 commit de132b3befa1e60664cc900723d0c499aa188e73
@@ -0,0 +1,70 @@
#-*- coding: utf-8 -*-
"""
@brief test log(time=60s)
"""
import sys
import os
import unittest
try:
import src
except ImportError:
path = os.path.normpath(
os.path.abspath(
os.path.join(
os.path.split(__file__)[0],
"..",
"..")))
if path not in sys.path:
sys.path.append(path)
import src
try:
import pyquickhelper as skip_
except ImportError:
path = os.path.normpath(
os.path.abspath(
os.path.join(
os.path.split(__file__)[0],
"..",
"..",
"..",
"pyquickhelper",
"src")))
if path not in sys.path:
sys.path.append(path)
import pyquickhelper as skip_
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import get_temp_folder, add_missing_development_version
from pyquickhelper.ipythonhelper import execute_notebook_list_finalize_ut
from src.code_beatrix.automation.notebook_test_helper import ls_notebooks, execute_notebooks, clean_function_notebook
import src.code_beatrix
class TestLONGNotebookExample (unittest.TestCase):
def setUp(self):
add_missing_development_version(
["pyensae", "jyquickhelper"], __file__)
def test_notebook_example(self):
fLOG(
__file__,
self._testMethodName,
OutputPrint=__name__ == "__main__")
temp = get_temp_folder(__file__, "temp_exemples")
keepnote = ls_notebooks("exemples")
self.assertTrue(len(keepnote) > 0)
res = execute_notebooks(temp, keepnote,
lambda i, n: "poppins" in n,
fLOG=fLOG,
clean_function=clean_function_notebook)
execute_notebook_list_finalize_ut(
res, fLOG=fLOG, dump=src.code_beatrix)
if __name__ == "__main__":
unittest.main()
@@ -59,7 +59,7 @@ def test_notebook_example(self):
keepnote = ls_notebooks("exemples")
self.assertTrue(len(keepnote) > 0)
res = execute_notebooks(temp, keepnote,
lambda i, n: "deviner" not in n,
lambda i, n: "poppins" not in n,
fLOG=fLOG,
clean_function=clean_function_notebook)
execute_notebook_list_finalize_ut(

0 comments on commit de132b3

Please sign in to comment.