From 7ebaad8b1790cf659fcb4017a57dd8686266a24a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lum=C3=ADr=20=27Frenzy=27=20Balhar?= Date: Wed, 23 Nov 2022 13:45:57 +0100 Subject: Drop dependency on py module (#7829) * pytest 7.2 no longer depends on py so it's better to drop it. `tmp_path` fixture is newer and uses `pathlib.Path` from stdlib instead of `LocalPath` from `py._path`. Co-authored-by: Pierre Sassoulas Co-authored-by: Andreas Finkler <3929834+DudeNr33@users.noreply.github.com> --- tests/config/test_per_directory_config.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'tests/config') diff --git a/tests/config/test_per_directory_config.py b/tests/config/test_per_directory_config.py index 4fb656c60..e0bf75e70 100644 --- a/tests/config/test_per_directory_config.py +++ b/tests/config/test_per_directory_config.py @@ -2,17 +2,16 @@ # For details: https://github.com/PyCQA/pylint/blob/main/LICENSE # Copyright (c) https://github.com/PyCQA/pylint/blob/main/CONTRIBUTORS.txt - -from py._path.local import LocalPath +from pathlib import Path from pylint.lint import Run -def test_fall_back_on_base_config(tmpdir: LocalPath) -> None: +def test_fall_back_on_base_config(tmp_path: Path) -> None: """Test that we correctly fall back on the base config.""" # A file under the current dir should fall back to the highest level # For pylint this is ./pylintrc - test_file = tmpdir / "test.py" + test_file = tmp_path / "test.py" runner = Run([__name__], exit=False) assert id(runner.linter.config) == id(runner.linter._base_config) -- cgit v1.2.1