"""
@brief      test log(time=0s)
"""
import os
import unittest
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import check_pep8, ExtTestCase


class TestCodeStyle(ExtTestCase):
    """Test style."""

    def test_style_src(self):
        thi = os.path.abspath(os.path.dirname(__file__))
        src_ = os.path.normpath(os.path.join(thi, "..", "..", "src"))
        check_pep8(src_, fLOG=fLOG,
                   pylint_ignore=('C0103', 'C1801', 'R0201', 'R1705', 'W0108', 'W0613',
                                  'C0111', 'W0703', 'W0223', 'W0107'),
                   skip=["Redefining built-in 'filter'",
                         "geocoding.py:174: E0702",
                         "elections.py:298: W0603",
                         ])

    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_.*",
                   pylint_ignore=('C0103', 'C1801', 'R0201', 'R1705', 'W0108', 'W0613',
                                  'C0111', 'W0107'),
                   skip=["src' imported but unused",
                         "skip_' imported but unused",
                         "skip__' imported but unused",
                         "skip___' imported but unused",
                         "Unused variable 'skip_'",
                         "imported as skip_",
                         "Unused import src",
                         "Unable to import 'keyring'",
                         ])


if __name__ == "__main__":
    unittest.main()

@@ -1132,373 +1132,8 @@
 ip=%5B
-%22src' imported but unused%22,%0A                         %22skip_' imported but unused%22,%0A                         %22skip__' imported but unused%22,%0A                         %22skip___' imported but unused%22,%0A                         %22Unused variable 'skip_'%22,%0A                         %22imported as skip_%22,%0A                         %22Unused import src%22,%0A                         
 %22Una

Update test_code_style.py