Skip to content

Commit

Permalink
enoding + unittest
Browse files Browse the repository at this point in the history
  • Loading branch information
sdpython committed Apr 5, 2016
1 parent 64491ce commit 2b717bd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 24 deletions.
18 changes: 11 additions & 7 deletions _doc/sphinxdoc/source/blog/2016/2016-04-04-seance_avril.rst
@@ -1,16 +1,14 @@


.. blogpost::
:title: Pistes pour la séance d'avril
:keywords: séance
:title: Sujet pour une balade d'avril
:keywords: séance
:date: 2016-04-04
:categories: cours

Sujet pour une balade

#. Python, Distributions, Module OS

* différences entre python 2.7, 3.x
* différences entre python 2.7, 3.x
* distribution : WinPython, Anaconda
* le cas des modules avec du C++
* Linux, Windows ?
Expand All @@ -21,9 +19,15 @@
* Le cours :ref:`l-seances-base`
* `Python pour un data scientist <http://www.xavierdupre.fr/app/ensae_teaching_cs/helpsphinx3/td_2a.html>`_

#. Algorithme récréative
#. Pause récréative

* `Laser Maze <http://www.marblesthebrainstore.com/laser-maze.htm>`_

#. Algorithme récréative

* `L'énigme de Harry Potter <http://www.xavierdupre.fr/app/ensae_teaching_cs/helpsphinx3/specials/hermionne.html>`_
* `L'énigme de Harry Potter <http://www.xavierdupre.fr/app/ensae_teaching_cs/helpsphinx3/specials/hermionne.html>`_
* `autres jeux <http://www.xavierdupre.fr/app/ensae_teaching_cs/helpsphinx3/specials/index_expose.html#l-expose-explication>`_
* `Scratch <http://lesenfantscodaient.fr/programmation/index_programmation.html>`_

.. image:: http://ecx.images-amazon.com/images/I/81RPCdhb+TL._SL1500_.jpg
:width: 150
25 changes: 8 additions & 17 deletions _unittests/ut_documentation/test_notebook_population.py
Expand Up @@ -37,30 +37,18 @@
sys.path.append(path)
import pyquickhelper as skip_

try:
import pyensae as skip__
except ImportError:
path = os.path.normpath(
os.path.abspath(
os.path.join(
os.path.split(__file__)[0],
"..",
"..",
"..",
"pyensae",
"src")))
if path not in sys.path:
sys.path.append(path)
import pyensae 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 pyquickhelper.pycode import fix_tkinter_issues_virtualenv
from src.actuariat_python.automation.notebook_test_helper import ls_notebooks, execute_notebooks, clean_function_notebook, unittest_raise_exception_notebook


class TestNotebookPopulation(unittest.TestCase):

def setUp(self):
add_missing_development_version(
["pyensae", "pymyinstall", "pyrsslocal"], __file__)

def test_notebook_population(self):
fLOG(
__file__,
Expand All @@ -74,10 +62,13 @@ def test_notebook_population(self):
"travis, unable to test TestNotebookPopulation.test_notebook_population")
return

from src.actuariat_python.automation.notebook_test_helper import ls_notebooks, execute_notebooks, clean_function_notebook, unittest_raise_exception_notebook
temp = get_temp_folder(__file__, "temp_population")
keepnote = [_ for _ in ls_notebooks(
"population") if "seance5_approche_fonctionnelle_enonce" not in _]
assert len(keepnote) > 0
for k in keepnote:
fLOG(k)
res = execute_notebooks(temp, keepnote,
lambda i, n: "deviner" not in n,
fLOG=fLOG,
Expand Down

0 comments on commit 2b717bd

Please sign in to comment.