Skip to content

Commit bbb68ac

Browse files
committed
ci: fix conftest compatibility with pytest 8.1
see: pytest-dev/pytest#11779
1 parent 40b9f6a commit bbb68ac

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

conftest.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def pytest_configure(config):
7070
# DEV: We must wrap with `@pytest.mark.hookwrapper` to inherit from default (e.g. honor `--ignore`)
7171
# https://github.com/pytest-dev/pytest/issues/846#issuecomment-122129189
7272
@pytest.hookimpl(hookwrapper=True)
73-
def pytest_ignore_collect(path, config):
73+
def pytest_ignore_collect(collection_path, config):
7474
"""
7575
Skip directories defining a required minimum Python version
7676
@@ -90,10 +90,10 @@ def pytest_ignore_collect(path, config):
9090
# Was not ignored by default behavior
9191
if not outcome.get_result():
9292
# DEV: `path` is a `LocalPath`
93-
path = str(path)
94-
if not os.path.isdir(path):
95-
path = os.path.dirname(path)
96-
dirname = os.path.basename(path)
93+
collection_path = str(collection_path)
94+
if not os.path.isdir(collection_path):
95+
collection_path = os.path.dirname(collection_path)
96+
dirname = os.path.basename(collection_path)
9797

9898
# Directory name match `py[23][0-9]`
9999
if PY_DIR_PATTERN.match(dirname):

0 commit comments

Comments
 (0)