Skip to content
Permalink
Browse files

pep8

  • Loading branch information...
sdpython committed Mar 2, 2019
1 parent 71c489a commit 4b8fe85570e42cfb41b890530ebe2681d6b88ab5
@@ -11,7 +11,6 @@
import sys
import os
import unittest
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import get_temp_folder, ExtTestCase


@@ -36,32 +35,24 @@
class TestVideoDLFace(ExtTestCase):

def test_modify_avideo_blur(self):
fLOG(
__file__,
self._testMethodName,
OutputPrint=__name__ == "__main__")
temp = get_temp_folder(__file__, "temp_videodl_face_blur")
vid = video_load(os.path.join(temp, '..', 'data', 'charlie.mp4'))
vide = video_extract_video(vid, 0, 5 if __name__ == "__main__" else 1)
vid2 = video_map_images(
vide, fps=10, name="detect",
logger='bar' if __name__ == "__main__" else None, fLOG=fLOG)
logger='bar' if __name__ == "__main__" else None)
exp = os.path.join(temp, "face.mp4")
video_save(vid2, exp)
self.assertExists(exp)
clean_video([vid2, vid, vide])

def test_modify_avideo(self):
fLOG(
__file__,
self._testMethodName,
OutputPrint=__name__ == "__main__")
temp = get_temp_folder(__file__, "temp_videodl_face_rect")
vid = video_load(os.path.join(temp, '..', 'data', 'charlie.mp4'))
vide = video_extract_video(vid, 0, 10 if __name__ == "__main__" else 1)
vid2 = video_map_images(
vide, fps=10, name="detect", action="rect",
logger='bar' if __name__ == "__main__" else None, fLOG=fLOG)
logger='bar' if __name__ == "__main__" else None)
exp = os.path.join(temp, "face.mp4")
self.assertTrue(vid2.make_frame is not None)
video_save_image(vid2, t=1, filename=os.path.join(temp, "img1.jpg"))
@@ -11,7 +11,6 @@
import sys
import os
import unittest
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import get_temp_folder, ExtTestCase, skipif_circleci


@@ -37,16 +36,12 @@ class TestVideoDLPeople(ExtTestCase):

@skipif_circleci("Received 'killed' signal")
def test_modify_avideo(self):
fLOG(
__file__,
self._testMethodName,
OutputPrint=__name__ == "__main__")
temp = get_temp_folder(__file__, "temp_videodl_people")
vid = video_load(os.path.join(temp, '..', 'data', 'mur.mp4'))
vide = video_extract_video(vid, 0, 5 if __name__ == "__main__" else 1)
vid2 = video_map_images(
vide, fps=10, name="people",
logger='bar' if __name__ == "__main__" else None, fLOG=fLOG)
logger='bar' if __name__ == "__main__" else None)
exp = os.path.join(temp, "people.mp4")
video_save(vid2, exp)
self.assertExists(exp)
@@ -50,7 +50,7 @@ def test_style_src(self):
def test_style_test(self):
thi = os.path.abspath(os.path.dirname(__file__))
test = os.path.normpath(os.path.join(thi, "..", ))
check_pep8(test, fLOG=fLOG, neg_pattern="temp_.*",
check_pep8(test, fLOG=fLOG, neg_pattern="((temp_.*)|(.*test_videodl_noenv4_face.*))",
pylint_ignore=('C0103', 'C1801', 'R0201', 'R1705', 'W0108', 'W0613',
'C0111', 'W0212', 'W0622', 'W0107'),
skip=["src' imported but unused",
@@ -129,15 +129,15 @@ def write_version():
sys.argv, __file__, project_var_name,
unittest_modules=["pyquickhelper"],
additional_notebook_path=["jyquickhelper", "pyquickhelper", "pyensae",
"pyrsslocal", "pymyinstall", "pymmails", "ensae_projects"],
"pyrsslocal", "pymyinstall", "pymmails", "ensae_projects"],
requirements=["pyquickhelper", "jyquickhelper", ],
blog_list=os.path.abspath(os.path.join(
"src", project_var_name, package_data[project_var_name][0])),
fLOG=logging_function, github_owner=project_owner,
covtoken=("4326eb4c-78b5-4ff3-9317-9329fdb20f43", "'_UT_37_std' in outfile"))
if not r and not ({"bdist_msi", "sdist",
"bdist_wheel", "publish", "publish_doc", "register",
"upload_docs", "bdist_wininst", "build_ext"} & set(sys.argv)):
"bdist_wheel", "publish", "publish_doc", "register",
"upload_docs", "bdist_wininst", "build_ext"} & set(sys.argv)):
raise Exception(
"unable to interpret command line: " + str(sys.argv))
else:

0 comments on commit 4b8fe85

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.