diff --git a/tests/checkers/unittest_imports.py b/tests/checkers/unittest_imports.py index 04eadcf1c2..40e504c49b 100644 --- a/tests/checkers/unittest_imports.py +++ b/tests/checkers/unittest_imports.py @@ -11,8 +11,8 @@ from pylint.checkers import imports from pylint.interfaces import UNDEFINED -from pylint.lint import Run from pylint.testutils import CheckerTestCase, MessageTest +from pylint.testutils._run import _Run as Run REGR_DATA = os.path.join(os.path.dirname(__file__), "..", "regrtest_data", "") @@ -152,7 +152,7 @@ def test_allow_reexport_package(capsys: CaptureFixture[str]) -> None: exit=False, ) output, errors = capsys.readouterr() - assert len(output.split("\n")) == 5, f"Expected 5 line breaks in:{output}" + assert len(output.split("\n")) == 7, f"Expected 7 line breaks in:{output}" assert ( "__init__.py:1:0: C0414: Import alias does not rename original package (useless-import-alias)" in output @@ -168,6 +168,7 @@ def test_allow_reexport_package(capsys: CaptureFixture[str]) -> None: [ f"{os.path.join(REGR_DATA, 'allow_reexport')}", "--allow-reexport-from-package=yes", + "--disable=missing-module-docstring", "-sn", ], exit=False, diff --git a/tests/config/pylint_config/test_pylint_config_generate.py b/tests/config/pylint_config/test_pylint_config_generate.py index 65fc05557a..adf7129a59 100644 --- a/tests/config/pylint_config/test_pylint_config_generate.py +++ b/tests/config/pylint_config/test_pylint_config_generate.py @@ -186,7 +186,15 @@ def test_writing_minimal_file( assert any(line.startswith("#") for line in captured.out.splitlines()) # Check minimal doesn't have comments and no default values - Run(["--accept-no-return-doc=y", "generate", "--interactive"], exit=False) + Run( + [ + "--load-plugins=pylint.extensions.docparams", + "--accept-no-return-doc=y", + "generate", + "--interactive", + ], + exit=False, + ) captured = capsys.readouterr() assert not any(i.startswith("#") for i in captured.out.split("\n")) assert "accept-no-return-doc" not in captured.out diff --git a/tests/config/test_per_directory_config.py b/tests/config/test_per_directory_config.py index e0bf75e706..85d918a211 100644 --- a/tests/config/test_per_directory_config.py +++ b/tests/config/test_per_directory_config.py @@ -4,7 +4,7 @@ from pathlib import Path -from pylint.lint import Run +from pylint.testutils._run import _Run as Run def test_fall_back_on_base_config(tmp_path: Path) -> None: diff --git a/tests/test_pylint_runners.py b/tests/test_pylint_runners.py index 06a16c3a57..6a55db9ebe 100644 --- a/tests/test_pylint_runners.py +++ b/tests/test_pylint_runners.py @@ -18,8 +18,8 @@ import pytest from pylint import run_epylint, run_pylint, run_pyreverse, run_symilar -from pylint.lint import Run from pylint.testutils import GenericTestReporter as Reporter +from pylint.testutils._run import _Run as Run from pylint.testutils.utils import _test_cwd if sys.version_info >= (3, 8):