Skip to content

Commit a2af585

Browse files
s-t-e-v-e-n-kmahmoud
authored andcommitted
Support pytest 9 changes
Starting from pytest 7, the py.path arguments to pytest's hook functions have been deprecated, replaced with pathlib.Path equivalents. Since pytest 7 is the minimum version we support, move to using it.
1 parent a7ae090 commit a2af585

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
_VERSION_MARKER = re.compile(r'_py(?P<major_version>\d)(?P<minor_version>\d)?')
66

77

8-
def pytest_ignore_collect(path, config):
8+
def pytest_ignore_collect(collection_path, config):
99
"""
1010
Ignore tests that end with _pyX, where X does not equal this
1111
interpreter's major version.
1212
"""
13-
filename = path.basename
13+
filename = collection_path.name
1414
modulename = filename.split('.', 1)[0]
1515
match = _VERSION_MARKER.search(modulename)
1616
if not match:

0 commit comments

Comments
 (0)