Skip to content

Commit adc0bc2

Browse files
[test] Removes 'test_pylint_config_attr' (#8468)
See fc0ed97, it's not relevant anymore.
1 parent 026a564 commit adc0bc2

File tree

1 file changed

+0
-23
lines changed

1 file changed

+0
-23
lines changed

tests/test_regr.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
from os.path import abspath, dirname, join
1717
from typing import cast
1818

19-
import astroid
2019
import pytest
2120

2221
from pylint import testutils
@@ -122,28 +121,6 @@ def test_check_package___init__(finalize_linter: PyLinter) -> None:
122121
assert checked == ["__init__"]
123122

124123

125-
# TODO: 3.0: Test are broken because of property shenanigans of config attribute
126-
# Re-enable after some of the old attributes have been removed after deprecation period
127-
@pytest.mark.xfail
128-
def test_pylint_config_attr() -> None:
129-
mod = astroid.MANAGER.ast_from_module_name("pylint.lint.pylinter")
130-
pylinter = mod["PyLinter"]
131-
expect = [
132-
"_ArgumentsManager",
133-
"object",
134-
"ReportsHandlerMixIn",
135-
"BaseTokenChecker",
136-
"BaseChecker",
137-
"_ArgumentsProvider",
138-
]
139-
assert [c.name for c in pylinter.ancestors()] == expect
140-
assert list(astroid.Instance(pylinter).getattr("config"))
141-
inferred = list(astroid.Instance(pylinter).igetattr("config"))
142-
assert len(inferred) >= 1
143-
assert inferred[0].root().name == "argparse"
144-
assert inferred[0].name == "Namespace"
145-
146-
147124
@pytest.mark.timeout(30)
148125
@pytest.mark.parametrize("file_names", ([join(REGR_DATA, "hang", "pkg4972.string")],))
149126
def test_hang(finalize_linter: PyLinter, file_names: list[str]) -> None:

0 commit comments

Comments
 (0)