From 9d4e7d7410c2f72bba64c04a16c17f6511d9874e Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Fri, 20 Sep 2024 11:02:52 +0200 Subject: [PATCH] test: pytest: use collection_path argument The path argument is deprecated since pytest 7 and an additional argument collection_path is it's replacement. It has slightly different semantics as it returns a PosixPath. This silences the deprecation warning on pytest 8. --- test/pytest/conftest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/pytest/conftest.py b/test/pytest/conftest.py index 2c5b215a1b25..81368791e441 100644 --- a/test/pytest/conftest.py +++ b/test/pytest/conftest.py @@ -35,8 +35,8 @@ def any_subprocesses() -> bool: # - there are general issues running under tox which need investigation if 'NO_QUNIT' in os.environ: @pytest.hookimpl - def pytest_ignore_collect(path) -> 'bool | None': - return path.basename == 'test_browser.py' or None + def pytest_ignore_collect(collection_path) -> 'bool | None': + return collection_path.name == 'test_browser.py' or None else: pytest_plugins = "js_coverage"