From 35ec0efecf4b9dfbba2f2e31263dba676c84c670 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?xavier=20dupr=C3=A9?= Date: Sun, 17 Sep 2017 22:21:06 +0200 Subject: [PATCH] fix missing image in unit test --- _unittests/ut_dnotebooks/test_LONG_2A_notebook_1.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/_unittests/ut_dnotebooks/test_LONG_2A_notebook_1.py b/_unittests/ut_dnotebooks/test_LONG_2A_notebook_1.py index cf62eca65..cb873a8ae 100644 --- a/_unittests/ut_dnotebooks/test_LONG_2A_notebook_1.py +++ b/_unittests/ut_dnotebooks/test_LONG_2A_notebook_1.py @@ -7,6 +7,7 @@ import sys import os import unittest +import shutil try: @@ -58,6 +59,13 @@ def test_notebook_runner(self): from src.ensae_teaching_cs.automation.notebook_test_helper import clean_function_1a temp = get_temp_folder(__file__, "temp_notebook2a_1") keepnote = ls_notebooks("td2a") + fold = os.path.dirname(keepnote[0]) + for png in os.listdir(fold): + if ".png" not in png: + continue + fLOG("copy", png) + shutil.copy(os.path.join(fold, png), temp) + self.assertTrue(len(keepnote) > 0) execute_notebooks(temp, keepnote, (lambda i, n: "_1" in n), clean_function=clean_function_1a, fLOG=fLOG, dump=src.ensae_teaching_cs)