From 73ded6b3ad45a80368e297617f23c0221c13dbbe Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Tue, 25 Mar 2025 15:00:37 -0700 Subject: [PATCH] tests: Fix a warning with pytest setup The path attribute has been deprecated and will be removed in pytest 9.0. The new argument to use is collection_path which is pathlib.Path object it is available in pytest 7.2 (bookworm) and above. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- plinth/conftest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plinth/conftest.py b/plinth/conftest.py index d6f14017e..aa23d287b 100644 --- a/plinth/conftest.py +++ b/plinth/conftest.py @@ -17,9 +17,9 @@ except ImportError: _functional_libs_available = False -def pytest_ignore_collect(path, config): +def pytest_ignore_collect(collection_path, config): """Ignore functional tests when splinter is not available.""" - if path.basename == 'test_functional.py': + if collection_path.name == 'test_functional.py': return not _functional_libs_available