dev-python/dogpile-cache: fix setuptools dep. & tests with pytest 6

Closes: https://bugs.gentoo.org/745696
Package-Manager: Portage-3.0.8, Repoman-3.0.2
Signed-off-by: Louis Sautier <sbraz@gentoo.org>
This commit is contained in:
Louis Sautier
2020-10-31 13:42:33 +01:00
parent 377ba1b319
commit 662ef35294
2 changed files with 25 additions and 1 deletions

View File

@@ -3,7 +3,6 @@
EAPI=7
DISTUTILS_USE_SETUPTOOLS=rdepend
PYTHON_COMPAT=( python3_{6..9} )
inherit distutils-r1
@@ -28,4 +27,9 @@ BDEPEND="
)
"
PATCHES=(
# https://github.com/sqlalchemy/dogpile.cache/pull/193
"${FILESDIR}/${P}-pytest6.patch"
)
distutils_enable_tests pytest

View File

@@ -0,0 +1,20 @@
commit 625f73ce189b43541636dc40d8d0e4cd4f9a1386
Author: Louis Sautier <sautier.louis@gmail.com>
Date: Sat Oct 31 02:23:06 2020 +0100
Support pytest 6
See https://docs.pytest.org/en/stable/deprecations.html#node-construction-changed-to-node-from-parent
diff --git a/tests/conftest.py b/tests/conftest.py
index 10afafb..0b2a1e4 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -26,6 +26,6 @@ def is_unittest(obj):
def pytest_pycollect_makeitem(collector, name, obj):
if is_unittest(obj) and not obj.__name__.startswith("_"):
- return UnitTestCase(name, parent=collector)
+ return UnitTestCase.from_parent(collector, name=name)
else:
return []