diff options
| author | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2025-05-17 18:59:18 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2025-05-17 18:59:18 +0000 |
| commit | e1bc9878cdf2ca006889a7f210a51592a5989d4a (patch) | |
| tree | 5febfd0d420e8b573dcd2d0b42cd8b2a7418cf42 /dev-python/testtools | |
| parent | f767356f836788e2bb2843072155579fe8d8d214 (diff) | |
| download | baldeagleos-repo-e1bc9878cdf2ca006889a7f210a51592a5989d4a.tar.gz baldeagleos-repo-e1bc9878cdf2ca006889a7f210a51592a5989d4a.tar.xz baldeagleos-repo-e1bc9878cdf2ca006889a7f210a51592a5989d4a.zip | |
Adding metadata
Diffstat (limited to 'dev-python/testtools')
| -rw-r--r-- | dev-python/testtools/files/testtools-2.7.2-py314.patch | 34 | ||||
| -rw-r--r-- | dev-python/testtools/testtools-2.7.2-r1.ebuild | 49 |
2 files changed, 83 insertions, 0 deletions
diff --git a/dev-python/testtools/files/testtools-2.7.2-py314.patch b/dev-python/testtools/files/testtools-2.7.2-py314.patch new file mode 100644 index 000000000000..afce3b2c12ad --- /dev/null +++ b/dev-python/testtools/files/testtools-2.7.2-py314.patch @@ -0,0 +1,34 @@ +https://github.com/testing-cabal/testtools/commit/79fa5d41a05c423cf43a65d2b347c7c566bcdfa5 + +From 79fa5d41a05c423cf43a65d2b347c7c566bcdfa5 Mon Sep 17 00:00:00 2001 +From: Stephen Finucane <stephen@that.guru> +Date: Fri, 21 Feb 2025 11:14:35 +0000 +Subject: [PATCH] Resolve deprecation warning + +See [1] for more info. + +[1] https://github.com/python/cpython/issues/79893 + +Signed-off-by: Stephen Finucane <stephen@that.guru> +--- + testtools/testcase.py | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/testtools/testcase.py b/testtools/testcase.py +index ad983730..4f4923b3 100644 +--- a/testtools/testcase.py ++++ b/testtools/testcase.py +@@ -268,8 +268,10 @@ def _reset(self): + + def __eq__(self, other): + eq = getattr(unittest.TestCase, "__eq__", None) +- if eq is not None and not unittest.TestCase.__eq__(self, other): +- return False ++ if eq is not None: ++ eq_ = unittest.TestCase.__eq__(self, other) ++ if eq_ is NotImplemented or not eq_: ++ return False + return self.__dict__ == getattr(other, "__dict__", None) + + # We need to explicitly set this since we're overriding __eq__ + diff --git a/dev-python/testtools/testtools-2.7.2-r1.ebuild b/dev-python/testtools/testtools-2.7.2-r1.ebuild new file mode 100644 index 000000000000..33a47bf0abd7 --- /dev/null +++ b/dev-python/testtools/testtools-2.7.2-r1.ebuild @@ -0,0 +1,49 @@ +# Copyright 1999-2025 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +DISTUTILS_USE_PEP517=hatchling +PYTHON_COMPAT=( python3_{9,10,11,12,13} pypy3 ) +PYTHON_REQ_USE="threads(+)" + +inherit distutils-r1 pypi + +DESCRIPTION="Extensions to the Python standard library unit testing framework" +HOMEPAGE=" + https://github.com/testing-cabal/testtools/ + https://pypi.org/project/testtools/ +" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x64-macos" +IUSE="test" +RESTRICT="!test? ( test )" + +BDEPEND=" + dev-python/hatch-vcs[${PYTHON_USEDEP}] + test? ( + >=dev-python/fixtures-2.0.0[${PYTHON_USEDEP}] + dev-python/testscenarios[${PYTHON_USEDEP}] + dev-python/testresources[${PYTHON_USEDEP}] + dev-python/twisted[${PYTHON_USEDEP}] + ) +" + +PATCHES=( + "${FILESDIR}/${PN}-2.7.2-twisted-fix.patch" + "${FILESDIR}/${PN}-2.7.2-py314.patch" +) + +distutils_enable_sphinx doc + +python_test() { + cp testtools/tests/__init__.py test_suite.py || die + if ! has_version "dev-python/twisted[${PYTHON_USEDEP}]"; then + sed -i -e '/twistedsupport/d' test_suite.py || die + fi + + "${EPYTHON}" -m testtools.run test_suite.test_suite || + die "tests failed under ${EPYTHON}" +} |
