1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
Description: 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.
Forwarded: not-needed
Origin: other, https://github.com/mahmoud/boltons/pull/391/commits/5bf0e99182fc910f641a0849fa209940d68bce32
Bug-Debian: https://bugs.debian.org/1122935
Author: Steve Kowalik <steven@wedontsleep.org>
---
tests/conftest.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/conftest.py b/tests/conftest.py
index d4d2192c..e2c9a0cf 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -5,12 +5,12 @@
_VERSION_MARKER = re.compile(r'_py(?P<major_version>\d)(?P<minor_version>\d)?')
-def pytest_ignore_collect(path, config):
+def pytest_ignore_collect(collection_path, config):
"""
Ignore tests that end with _pyX, where X does not equal this
interpreter's major version.
"""
- filename = path.basename
+ filename = collection_path.name
modulename = filename.split('.', 1)[0]
match = _VERSION_MARKER.search(modulename)
if not match:
|