diff --git a/main/py3-testtools/APKBUILD b/main/py3-testtools/APKBUILD index 594f01f0f41d..ee7b952e7a8c 100644 --- a/main/py3-testtools/APKBUILD +++ b/main/py3-testtools/APKBUILD @@ -3,7 +3,7 @@ pkgname=py3-testtools _pkgname=testtools pkgver=2.7.1 -pkgrel=1 +pkgrel=2 pkgdesc="Extensions to the Python standard library unit testing framework" url="https://pypi.org/project/testtools" arch="noarch" @@ -11,7 +11,8 @@ license="MIT" depends="python3 py3-hatch-vcs py3-fixtures" makedepends="py3-gpep517 py3-setuptools py3-wheel" subpackages="$pkgname-pyc" -source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz" +source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz + pytest8.2.patch" builddir="$srcdir"/$_pkgname-$pkgver options="!check" # needs community/py3-twisted and testscenarios from pypi @@ -28,4 +29,5 @@ package() { sha512sums=" 78af1c2af6f93671074dafedeaaf3ddbcc806e78c3153a3b90f88874c967e34a18cb85e5649b08fabb4ba4ae649eeb401e79c77c3b9233d9eee2a3c2267a4596 testtools-2.7.1.tar.gz +64151feb16be07260758cc9020fa978a1810b8bbe7fc2f56fc5b6ef6f0ce3ae68c092a57280bca4671f3982bac6254db66cc730e3cae67ece1e85eb2f861f19a pytest8.2.patch " diff --git a/main/py3-testtools/pytest8.2.patch b/main/py3-testtools/pytest8.2.patch new file mode 100644 index 000000000000..e3c9ee24d1ba --- /dev/null +++ b/main/py3-testtools/pytest8.2.patch @@ -0,0 +1,23 @@ +diff --git a/testtools/testcase.py b/testtools/testcase.py +index 004fdb5..b8e9010 100644 +--- a/testtools/testcase.py ++++ b/testtools/testcase.py +@@ -693,7 +693,17 @@ class TestCase(unittest.TestCase): + + def _get_test_method(self): + method_name = getattr(self, '_testMethodName') +- return getattr(self, method_name) ++ try: ++ m = getattr(self, method_name) ++ except AttributeError: ++ if method_name != "runTest": ++ # We allow instantiation with no explicit method name ++ # but not an *incorrect* or missing method name. ++ raise ValueError( ++ "no such test method in %s: %s" % (self.__class__, method_name) ++ ) ++ else: ++ return m + + def _run_test_method(self, result): + """Run the test method for this test.