Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: replace deprecated path parameter in pytest_ignore_collect
The (path: py.path.local) argument was removed in pytest 9, replaced
by (collection_path: pathlib.Path). Update parameter name and use
pathlib.Path.name instead of py.path.local.basename.

Made-with: Cursor
  • Loading branch information
hrnciar committed Mar 25, 2026
commit 74710421be26ffe9ea4cb8aacfaba8315ac66f8c
4 changes: 2 additions & 2 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import sys
PY3 = sys.version_info[0] >= 3

def pytest_ignore_collect(path, config):
basename = path.basename
def pytest_ignore_collect(collection_path, config):
basename = collection_path.name

if not PY3 and "py3" in basename or PY3 and "py2" in basename or 'pytest' in basename:
return True