summaryrefslogtreecommitdiff
path: root/tests/config
diff options
context:
space:
mode:
authorLumír 'Frenzy' Balhar <frenzy.madness@gmail.com>2022-11-23 13:45:57 +0100
committerGitHub <noreply@github.com>2022-11-23 12:45:57 +0000
commit7ebaad8b1790cf659fcb4017a57dd8686266a24a (patch)
treeb0a3341287890e641f1ba5a22cc1ff72df1198a0 /tests/config
parent694d3024dbfea06aefd9288a99d7a375fe100859 (diff)
downloadpylint-git-7ebaad8b1790cf659fcb4017a57dd8686266a24a.tar.gz
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 <pierre.sassoulas@gmail.com> Co-authored-by: Andreas Finkler <3929834+DudeNr33@users.noreply.github.com>
Diffstat (limited to 'tests/config')
-rw-r--r--tests/config/test_per_directory_config.py7
1 files changed, 3 insertions, 4 deletions
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)