Skip to content
Permalink
Browse files

changes for pylint

  • Loading branch information...
sdpython committed May 13, 2018
1 parent 1b80794 commit 2eaa4a3f20682db9a4ee35c0495512c6aabdc55e
Showing with 196 additions and 974 deletions.
  1. +3 −17 _unittests/run_unittests.py
  2. +3 −18 _unittests/ut_ai/test_seg_image.py
  3. +1 −17 _unittests/ut_algorithm/test_classroom.py
  4. +2 −17 _unittests/ut_algorithm/test_classroom36.py
  5. +2 −18 _unittests/ut_algorithm/test_classroom_short1.py
  6. +1 −17 _unittests/ut_algorithm/test_classroom_short2.py
  7. +2 −18 _unittests/ut_algorithm/test_tsp.py
  8. +2 −23 _unittests/ut_art/test_LONG_video_noenv1.py
  9. +4 −20 _unittests/ut_art/test_audio_noenv1.py
  10. +1 −17 _unittests/ut_art/test_check_video.py
  11. +4 −25 _unittests/ut_art/test_drawing_video.py
  12. +2 −19 _unittests/ut_art/test_video_download.py
  13. +2 −23 _unittests/ut_art/test_video_noenv2_audio.py
  14. +2 −23 _unittests/ut_art/test_video_noenv3.py
  15. +2 −19 _unittests/ut_art/test_video_noenv3_frame.py
  16. +2 −23 _unittests/ut_art/test_video_noenv3_modif.py
  17. +2 −23 _unittests/ut_art/test_video_noenv5_audio_bug.py
  18. +2 −23 _unittests/ut_art/test_video_noenv6_text.py
  19. +2 −19 _unittests/ut_art/test_video_noenv7_image_position.py
  20. +2 −19 _unittests/ut_art/test_video_noenv7_image_resize.py
  21. +2 −19 _unittests/ut_art/test_video_noenv7_text_image.py
  22. +2 −19 _unittests/ut_art/test_video_noenv8_placement.py
  23. +2 −19 _unittests/ut_art/test_video_noenvA_check_open_process.py
  24. +2 −19 _unittests/ut_art/test_videodl_noenv4_face.py
  25. +2 −19 _unittests/ut_art/test_videodl_noenv9_people.py
  26. +3 −18 _unittests/ut_documentation/test_LONG_notebook_example.py
  27. +3 −19 _unittests/ut_documentation/test_LONG_notebook_scratch.py
  28. +1 −17 _unittests/ut_documentation/test_automation_constant.py
  29. +0 −94 _unittests/ut_documentation/test_blog_helper.py
  30. +3 −19 _unittests/ut_documentation/test_notebook_ai.py
  31. +3 −19 _unittests/ut_documentation/test_notebook_algorithm.py
  32. +3 −18 _unittests/ut_documentation/test_notebook_example.py
  33. +3 −19 _unittests/ut_documentation/test_notebook_javascript.py
  34. +1 −18 _unittests/ut_faq/test_pass.py
  35. +1 −17 _unittests/ut_ipythonhelper/test_canvas.py
  36. +1 −17 _unittests/ut_ipythonhelper/test_ipy_path.py
  37. +1 −18 _unittests/ut_ipythonhelper/test_magic_snap.py
  38. +1 −17 _unittests/ut_jsscripts/test_copy_tools.py
  39. +34 −43 _unittests/ut_module/test_code_style.py
  40. +0 −33 _unittests/ut_module/test_convert_notebooks.py
  41. +4 −20 _unittests/ut_module/test_write_script.py
  42. +1 −17 _unittests/ut_scratchs/test_check_files.py
  43. +1 −1 requirements.txt
  44. +4 −4 src/code_beatrix/__init__.py
  45. +1 −1 src/code_beatrix/ai/image_segmentation.py
  46. +1 −1 src/code_beatrix/algorithm/tsp.py
  47. +50 −31 src/code_beatrix/art/video.py
  48. +2 −2 src/code_beatrix/art/video_drawing.py
  49. +8 −4 src/code_beatrix/art/videodl.py
  50. +1 −1 src/code_beatrix/automation/notebook_test_helper.py
  51. +3 −2 src/code_beatrix/ipythonhelper/magic_scratch.py
  52. +9 −11 src/code_beatrix/ipythonhelper/path_helper.py
@@ -3,25 +3,11 @@
@brief run all unit tests
"""

import os
import sys


def main():
try:
import pyquickhelper as skip_
except ImportError:
sys.path.append(
os.path.normpath(
os.path.abspath(
os.path.join(
os.path.split(__file__)[0],
"..",
"..",
"pyquickhelper",
"src"))))
import pyquickhelper as skip_

"""
Runs the unit tests.
"""
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import main_wrapper_tests
fLOG(OutputPrint=True)
@@ -7,6 +7,8 @@
import os
import unittest
import skimage
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import get_temp_folder, ExtTestCase


try:
@@ -22,24 +24,7 @@
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, ExtTestCase
from src.code_beatrix.ai import DLImageSegmentation


@@ -59,7 +44,7 @@ def test_seg_image1(self):
dl = DLImageSegmentation(fLOG=fLOG)

for i, img in enumerate(imgs):
feat, res = dl.predict(img)
_, res = dl.predict(img)
viz = dl.plot(img, res)

out_file = os.path.join(temp, "out_img%d.png" % i)
@@ -6,6 +6,7 @@
import sys
import os
import unittest
from pyquickhelper.loghelper import fLOG


try:
@@ -21,23 +22,6 @@
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 src.code_beatrix.algorithm.classroom import find_best_positions_greedy, measure_positions


@@ -6,6 +6,8 @@
import sys
import os
import unittest
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import get_temp_folder, fix_tkinter_issues_virtualenv


try:
@@ -21,24 +23,7 @@
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, fix_tkinter_issues_virtualenv
from src.code_beatrix.algorithm.classroom import random_positions, plot_positions, optimize_positions


@@ -6,6 +6,8 @@
import sys
import os
import unittest
from pyquickhelper.loghelper import fLOG, CustomLog
from pyquickhelper.pycode import get_temp_folder, fix_tkinter_issues_virtualenv


try:
@@ -21,24 +23,6 @@
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, CustomLog
from pyquickhelper.pycode import get_temp_folder, fix_tkinter_issues_virtualenv
from src.code_beatrix.algorithm.classroom import random_positions, plot_positions


@@ -6,6 +6,7 @@
import sys
import os
import unittest
from pyquickhelper.loghelper import fLOG


try:
@@ -21,23 +22,6 @@
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 src.code_beatrix.algorithm.data import load_prenoms_w


@@ -6,6 +6,8 @@
import sys
import os
import unittest
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import fix_tkinter_issues_virtualenv, get_temp_folder


try:
@@ -21,24 +23,6 @@
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 fix_tkinter_issues_virtualenv, get_temp_folder
from src.code_beatrix.algorithm import voyageur_commerce_simple, distance_circuit, plot_circuit


@@ -1,34 +1,15 @@
# -*- coding: utf-8 -*-
"""
@brief test log(time=1000s)
Duraction is around a few seconds but the test needs to be run
at the end of the series of unitests as it interferes
with the notebook unittesting (it uses Popen too).
"""


import sys
import os
import unittest
import subprocess


try:
import pyquickhelper
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
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import get_temp_folder, ExtTestCase


try:
@@ -45,8 +26,6 @@
import src


from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import get_temp_folder, ExtTestCase
from src.code_beatrix.art.video import video_enumerate_frames


@@ -2,32 +2,18 @@
"""
@brief test log(time=1000s)
Duraction is around a few seconds but the test needs to be run
Duration is around a few seconds but the test needs to be run
at the end of the series of unitests as it interferes
with the notebook unittesting (it uses Popen too).
This is true for similar unit tests.
"""


import sys
import os
import unittest


try:
import pyquickhelper
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
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import get_temp_folder, ExtTestCase


try:
@@ -44,8 +30,6 @@
import src


from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import get_temp_folder, ExtTestCase
from src.code_beatrix.art.video import audio_compose, audio_save, audio_extract_audio, audio_concatenate


@@ -5,6 +5,7 @@
import sys
import os
import unittest
from pyquickhelper.loghelper import fLOG


try:
@@ -20,24 +21,7 @@
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 src.code_beatrix import check


Oops, something went wrong.

0 comments on commit 2eaa4a3

Please sign in to comment.
You can’t perform that action at this time.