File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 41
41
from pylint .testutils import create_files
42
42
from pylint .testutils ._run import _Run as Run
43
43
from pylint .typing import MessageLocationTuple
44
- from pylint .utils import FileState , print_full_documentation , tokenize_module
44
+ from pylint .utils import (
45
+ FileState ,
46
+ LinterStats ,
47
+ print_full_documentation ,
48
+ tokenize_module ,
49
+ )
45
50
46
51
if os .name == "java" :
47
52
if os .name == "nt" :
@@ -1030,6 +1035,8 @@ def test_by_module_statement_value(initialized_linter: PyLinter) -> None:
1030
1035
by_module_stats = linter .stats .by_module
1031
1036
for module , module_stats in by_module_stats .items ():
1032
1037
linter2 = initialized_linter
1038
+ linter2 .stats = LinterStats ()
1039
+
1033
1040
if module == "data" :
1034
1041
linter2 .check ([os .path .join (os .path .dirname (__file__ ), "data/__init__.py" )])
1035
1042
else :
Original file line number Diff line number Diff line change 20
20
21
21
from pylint import testutils
22
22
from pylint .lint .pylinter import PyLinter
23
+ from pylint .utils .linterstats import LinterStats
23
24
24
25
REGR_DATA = join (dirname (abspath (__file__ )), "regrtest_data" )
25
26
sys .path .insert (1 , REGR_DATA )
@@ -116,6 +117,7 @@ def test_check_package___init__(finalize_linter: PyLinter) -> None:
116
117
assert sorted (checked ) == sorted (filename )
117
118
118
119
os .chdir (join (REGR_DATA , "package" ))
120
+ finalize_linter .stats = LinterStats ()
119
121
finalize_linter .check (["__init__" ])
120
122
checked = list (finalize_linter .stats .by_module .keys ())
121
123
assert checked == ["__init__" ]
You can’t perform that action at this time.
0 commit comments