Skip to content
This repository has been archived by the owner on Jul 22, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
more for pylint
  • Loading branch information
sdpython committed May 12, 2018
1 parent aa34483 commit d68bf98
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 247 deletions.
20 changes: 3 additions & 17 deletions _unittests/run_unittests.py
Expand Up @@ -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)
Expand Down
18 changes: 1 addition & 17 deletions _unittests/ut_grabber/test_box_mock.py
Expand Up @@ -6,6 +6,7 @@
import sys
import os
import unittest
from pyquickhelper.loghelper import fLOG

try:
import src
Expand All @@ -20,25 +21,8 @@
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 src.pymmails import EmailMessage, MailBoxMock, EmailMessageRenderer
from pyquickhelper.loghelper import fLOG


class TestMessageBoxMock(unittest.TestCase):
Expand Down
20 changes: 2 additions & 18 deletions _unittests/ut_grabber/test_box_mock_render.py
Expand Up @@ -6,6 +6,8 @@
import sys
import os
import unittest
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import get_temp_folder

try:
import src
Expand All @@ -20,26 +22,8 @@
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 src.pymmails import MailBoxMock, EmailMessageRenderer, EmailMessageListRenderer
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import get_temp_folder


class TestMessageBoxMock(unittest.TestCase):
Expand Down
18 changes: 1 addition & 17 deletions _unittests/ut_grabber/test_default.py
Expand Up @@ -6,6 +6,7 @@
import sys
import os
import unittest
from pyquickhelper.loghelper import fLOG

try:
import src
Expand All @@ -20,25 +21,8 @@
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 src.pymmails import EmailMessage
from pyquickhelper.loghelper import fLOG


class TestDefault(unittest.TestCase):
Expand Down
20 changes: 2 additions & 18 deletions _unittests/ut_grabber/test_mailbox.py
Expand Up @@ -7,6 +7,8 @@
import os
import unittest
import warnings
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import get_temp_folder, is_travis_or_appveyor

try:
import src
Expand All @@ -21,26 +23,8 @@
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 src.pymmails import MailBoxImap, EmailMessageRenderer
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import get_temp_folder, is_travis_or_appveyor


class TestMailBox(unittest.TestCase):
Expand Down
20 changes: 2 additions & 18 deletions _unittests/ut_grabber/test_mailbox_extended.py
Expand Up @@ -8,6 +8,8 @@
import unittest
import warnings
import datetime
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import is_travis_or_appveyor

try:
import src
Expand All @@ -22,26 +24,8 @@
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 src.pymmails import MailBoxImap
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import is_travis_or_appveyor


class TestMailBox(unittest.TestCase):
Expand Down
18 changes: 1 addition & 17 deletions _unittests/ut_grabber/test_metadata.py
Expand Up @@ -7,6 +7,7 @@
import os
import unittest
from collections import OrderedDict
from pyquickhelper.loghelper import fLOG

try:
import src
Expand All @@ -21,25 +22,8 @@
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 src.pymmails import EmailMessage
from pyquickhelper.loghelper import fLOG


class TestMetaData(unittest.TestCase):
Expand Down
18 changes: 1 addition & 17 deletions _unittests/ut_grabber/test_parse.py
Expand Up @@ -6,6 +6,7 @@
import sys
import os
import unittest
from pyquickhelper.loghelper import fLOG

try:
import src
Expand All @@ -20,25 +21,8 @@
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 src.pymmails import EmailMessage
from pyquickhelper.loghelper import fLOG


class TestParse(unittest.TestCase):
Expand Down
19 changes: 2 additions & 17 deletions _unittests/ut_helpers/test_buffer_files_writing.py
Expand Up @@ -6,6 +6,8 @@
import sys
import os
import unittest
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import get_temp_folder

try:
import src
Expand All @@ -20,25 +22,8 @@
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 src.pymmails.helpers import BufferFilesWriting
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import get_temp_folder


class TestBufferFilesWriting(unittest.TestCase):
Expand Down
20 changes: 2 additions & 18 deletions _unittests/ut_mails/test_email.py
Expand Up @@ -7,6 +7,8 @@
import os
import unittest
import pickle
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import get_temp_folder

try:
import src
Expand All @@ -21,26 +23,8 @@
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 src.pymmails import EmailMessage, EmailMessageRenderer
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import get_temp_folder


class TestEmail (unittest.TestCase):
Expand Down
18 changes: 1 addition & 17 deletions _unittests/ut_mails/test_grab.py
Expand Up @@ -6,6 +6,7 @@
import os
import unittest
import socket
from pyquickhelper.loghelper import fLOG

try:
import src
Expand All @@ -20,25 +21,8 @@
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 src.pymmails import MailBoxImap
from pyquickhelper.loghelper import fLOG


class TestGrab (unittest.TestCase):
Expand Down

0 comments on commit d68bf98

Please sign in to comment.