Permalink
Browse files

fix a couple of unit test and imports

  • Loading branch information...
sdpython committed May 14, 2017
1 parent 3a9c522 commit 5ddf2c14f6ce5c5aed4cae093e50c1aa337c640f
View
@@ -260,3 +260,5 @@ auto_*.db3
/src/code_beatrix/jsscripts/Snapin8r/tests/Topsy Turvy- the game
/src/code_beatrix/jsscripts/Snapin8r/tests/Snap test
/src/code_beatrix/jsscripts/Snapin8r/tests
_unittests/ut_documentation/test_notebook_algorithm.py.err
_unittests/run_unittests.py.out
@@ -36,13 +36,18 @@
sys.path.append(path)
import pyquickhelper as skip_
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import get_temp_folder
from pyquickhelper.pycode import get_temp_folder, add_missing_development_version
from src.code_beatrix.automation.notebook_test_helper import ls_notebooks, execute_notebooks, clean_function_notebook, unittest_raise_exception_notebook
class TestNotebookAlgorithm (unittest.TestCase):
def setUp(self):
add_missing_development_version(["pymyinstall", "pyensae", "pymmails", "ensae_projects",
"jyquickhelper"], __file__, hide=True)
def test_notebook_algorithm(self):
fLOG(
__file__,
@@ -39,7 +39,7 @@
from pyquickhelper.loghelper import fLOG
from src.code_beatrix.jsscripts import copy_jstool2ipython
from src.code_beatrix.jsscripts import copy_jstool2notebook
class TestCopyTools(unittest.TestCase):
@@ -55,7 +55,7 @@ def test_copy_tools(self):
"travis, unable to test TestCopyTools.test_copy_tools")
return
res = copy_jstool2ipython("snap")
res = copy_jstool2notebook("snap")
assert isinstance(res, list)
@@ -49,7 +49,13 @@ def get_additional_paths():
@return list of paths
"""
import pyquickhelper
import jyquickhelper
import ensae_projects
import pyensae
addpath = [os.path.dirname(pyquickhelper.__file__),
os.path.dirname(jyquickhelper.__file__),
os.path.dirname(ensae_projects.__file__),
os.path.dirname(pyensae.__file__),
os.path.join(os.path.abspath(os.path.dirname(__file__)), ".."),
]
addpath = [os.path.normpath(os.path.join(_, "..")) for _ in addpath]
@@ -105,12 +111,8 @@ def clean_function_notebook(code):
return code
def execute_notebooks(folder,
notebooks,
filter,
clean_function=None,
fLOG=noLOG,
deepfLOG=noLOG):
def execute_notebooks(folder, notebooks, filter, clean_function=None,
fLOG=noLOG, deepfLOG=noLOG):
"""
execute a list of notebooks

0 comments on commit 5ddf2c1

Please sign in to comment.