-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathtest_SKIP_code_style.py
More file actions
43 lines (37 loc) · 1.77 KB
/
test_SKIP_code_style.py
File metadata and controls
43 lines (37 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
"""
@brief test log(time=0s)
"""
import os
import unittest
from pyquickhelper.loghelper import fLOG
from pyquickhelper.pycode import check_pep8, ExtTestCase, skipif_circleci
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, "..", "..", "mlinsights"))
check_pep8(src_, fLOG=fLOG,
pylint_ignore=('C0103', 'C1801', 'R0201', 'R1705', 'W0108', 'W0613',
'W0201', 'W0221', 'E0632', 'R1702', 'W0212', 'W0223',
'W0107', "R1720", 'R1732', 'C0209'),
skip=["categories_to_integers.py:174: W0640",
"E0401: Unable to import 'mlinsights.mlmodel.piecewise_tree_regression_criterion",
"setup.py:",
"[E731]",
])
@skipif_circleci('mysterious fail')
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', 'C0111', 'R1702', 'C0415', "R1720",
'R1732', 'C0209'),
skip=["Instance of 'tuple' has no",
"[E402] module level import",
"E0611: No name '_test_criterion_",
"E0611: No name 'SimpleRegressorCriterion'",
"E0611: No name 'piecewise_tree_",
])
if __name__ == "__main__":
unittest.main()