mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-21 07:55:00 +00:00
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 <sunil@medhas.org> Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
70ed89eff9
commit
73ded6b3ad
@ -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
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user