diff options
Diffstat (limited to 'dev-python/python-subunit')
| -rw-r--r-- | dev-python/python-subunit/files/subunit-1.4.5-testtools-2.8.patch | 46 | ||||
| -rw-r--r-- | dev-python/python-subunit/python-subunit-1.4.4-r1.ebuild (renamed from dev-python/python-subunit/python-subunit-1.4.4.ebuild) | 3 | ||||
| -rw-r--r-- | dev-python/python-subunit/python-subunit-1.4.5-r1.ebuild (renamed from dev-python/python-subunit/python-subunit-1.4.5.ebuild) | 4 |
3 files changed, 52 insertions, 1 deletions
diff --git a/dev-python/python-subunit/files/subunit-1.4.5-testtools-2.8.patch b/dev-python/python-subunit/files/subunit-1.4.5-testtools-2.8.patch new file mode 100644 index 000000000000..5e1161567860 --- /dev/null +++ b/dev-python/python-subunit/files/subunit-1.4.5-testtools-2.8.patch @@ -0,0 +1,46 @@ +From a72e9c343bd369cf840b29e074417fed5d05d59c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Jelmer=20Vernoo=C4=B3?= <jelmer@jelmer.uk> +Date: Mon, 22 Dec 2025 11:05:54 +0000 +Subject: [PATCH] Fix compatibility with testtools 2.8.2 + +LP: #2136951 +--- + python/subunit/tests/test_test_protocol2.py | 17 ++++++++++++----- + 1 file changed, 12 insertions(+), 5 deletions(-) + +diff --git a/python/subunit/tests/test_test_protocol2.py b/python/subunit/tests/test_test_protocol2.py +index 6d1e03b..2874e43 100644 +--- a/python/subunit/tests/test_test_protocol2.py ++++ b/python/subunit/tests/test_test_protocol2.py +@@ -30,7 +30,12 @@ except ImportError: + from testtools import TestCase + from testtools.matchers import Contains, HasLength + from testtools.testresult.doubles import StreamResult +-from testtools.tests.test_testresult import TestStreamResultContract ++ ++try: ++ from testtools.tests.test_testresult import TestStreamResultContract ++except ImportError: ++ # testtools >= 2.8 no longer includes the tests submodule ++ TestStreamResultContract = None + + import subunit + import iso8601 +@@ -54,11 +59,13 @@ CONSTANT_TAGS = [ + ] + + +-class TestStreamResultToBytesContract(TestCase, TestStreamResultContract): +- """Check that StreamResult behaves as testtools expects.""" ++if TestStreamResultContract is not None: + +- def _make_result(self): +- return subunit.StreamResultToBytes(BytesIO()) ++ class TestStreamResultToBytesContract(TestCase, TestStreamResultContract): ++ """Check that StreamResult behaves as testtools expects.""" ++ ++ def _make_result(self): ++ return subunit.StreamResultToBytes(BytesIO()) + + + class TestStreamResultToBytes(TestCase): diff --git a/dev-python/python-subunit/python-subunit-1.4.4.ebuild b/dev-python/python-subunit/python-subunit-1.4.4-r1.ebuild index 36fb35a7074b..54c947134881 100644 --- a/dev-python/python-subunit/python-subunit-1.4.4.ebuild +++ b/dev-python/python-subunit/python-subunit-1.4.4-r1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2025 Gentoo Authors +# Copyright 1999-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -39,6 +39,7 @@ DEPEND=" dev-python/fixtures[${PYTHON_USEDEP}] dev-python/hypothesis[${PYTHON_USEDEP}] dev-python/testscenarios[${PYTHON_USEDEP}] + <dev-python/testtools-2.8[${PYTHON_USEDEP}] ) " diff --git a/dev-python/python-subunit/python-subunit-1.4.5.ebuild b/dev-python/python-subunit/python-subunit-1.4.5-r1.ebuild index 614895b427fe..639ac63a114a 100644 --- a/dev-python/python-subunit/python-subunit-1.4.5.ebuild +++ b/dev-python/python-subunit/python-subunit-1.4.5-r1.ebuild @@ -12,6 +12,7 @@ MY_P=subunit-${PV} DESCRIPTION="A streaming protocol for test results" HOMEPAGE=" https://launchpad.net/subunit/ + https://github.com/testing-cabal/subunit/ https://pypi.org/project/python-subunit/ " SRC_URI=" @@ -39,11 +40,14 @@ DEPEND=" dev-python/fixtures[${PYTHON_USEDEP}] dev-python/hypothesis[${PYTHON_USEDEP}] dev-python/testscenarios[${PYTHON_USEDEP}] + <dev-python/testtools-2.9[${PYTHON_USEDEP}] ) " PATCHES=( "${FILESDIR}/subunit-1.4.0-werror.patch" + # https://github.com/testing-cabal/subunit/commit/a72e9c343bd369cf840b29e074417fed5d05d59c + "${FILESDIR}/subunit-1.4.5-testtools-2.8.patch" ) src_prepare() { |
