diff options
| -rw-r--r-- | debian/changelog | 7 | ||||
| -rw-r--r-- | debian/patches/python-3.14-remove-broken-tests.patch | 105 | ||||
| -rw-r--r-- | debian/patches/series | 1 | ||||
| -rw-r--r-- | debian/tests/control | 4 | ||||
| -rwxr-xr-x | debian/tests/unittests | 7 |
5 files changed, 122 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog index ea3e453..335e172 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +python-testtools (2.8.2-2) unstable; urgency=medium + + * Fixed executing autopkgtest. + * Add python-3.14-remove-broken-tests.patch. + + -- Thomas Goirand <[email protected]> Mon, 19 Jan 2026 12:13:57 +0100 + python-testtools (2.8.2-1) unstable; urgency=medium * New upstream release. diff --git a/debian/patches/python-3.14-remove-broken-tests.patch b/debian/patches/python-3.14-remove-broken-tests.patch new file mode 100644 index 0000000..7790eac --- /dev/null +++ b/debian/patches/python-3.14-remove-broken-tests.patch @@ -0,0 +1,105 @@ +Description: Remove broken tests in Python 3.14 +Author: Thomas Goirand <[email protected]> +Forwarded: no +Last-Update: 2026-01-19 + +--- python-testtools-2.8.2.orig/tests/test_testresult.py ++++ python-testtools-2.8.2/tests/test_testresult.py +@@ -1651,61 +1651,6 @@ class TestTestResult(TestCase): + result.time(now) + self.assertEqual(now, result._now()) + +- def test_traceback_formatting_without_stack_hidden(self): +- # During the testtools test run, we show our levels of the stack, +- # because we want to be able to use our test suite to debug our own +- # code. +- result = self.makeResult() +- test = make_erroring_test() +- test.run(result) +- self.assertThat( +- result.errors[0][1], +- DocTestMatches( +- "Traceback (most recent call last):\n" +- ' File "...testtools...runtest.py", line ..., in _run_user\n' +- " return fn(*args, **kwargs)\n..." +- ' File "...testtools...testcase.py", line ..., in _run_test_method\n' +- " return self._get_test_method()()\n..." +- ' File "...testtools...tests...test_testresult.py", ' +- "line ..., in error\n" +- " 1 / 0\n..." +- "ZeroDivisionError: ...\n", +- doctest.ELLIPSIS | doctest.REPORT_UDIFF, +- ), +- ) +- +- def test_traceback_formatting_with_stack_hidden(self): +- result = self.makeResult() +- test = make_erroring_test() +- run_with_stack_hidden(True, test.run, result) +- self.assertThat( +- result.errors[0][1], +- DocTestMatches( +- "Traceback (most recent call last):\n" +- ' File "...testtools...tests...test_testresult.py", ' +- "line ..., in error\n" +- " 1 / 0\n..." +- "ZeroDivisionError: ...\n", +- doctest.ELLIPSIS, +- ), +- ) +- +- def test_traceback_formatting_with_stack_hidden_mismatch(self): +- result = self.makeResult() +- test = make_mismatching_test() +- run_with_stack_hidden(True, test.run, result) +- self.assertThat( +- result.failures[0][1], +- DocTestMatches( +- "Traceback (most recent call last):\n" +- ' File "...testtools...tests...test_testresult.py", ' +- "line ..., in mismatch\n" +- " self.assertEqual(1, 2)\n" +- "...MismatchError: 1 != 2\n", +- doctest.ELLIPSIS, +- ), +- ) +- + def test_exc_info_to_unicode(self): + # subunit upcalls to TestResult._exc_info_to_unicode, so we need to + # make sure that it's there. +@@ -1717,35 +1662,6 @@ class TestTestResult(TestCase): + text_traceback = result._exc_info_to_unicode(exc_info, test) + self.assertEqual(TracebackContent(exc_info, test).as_text(), text_traceback) + +- def test_traceback_with_locals(self): +- result = self.makeResult() +- result.tb_locals = True +- test = make_erroring_test() +- test.run(result) +- self.assertThat( +- result.errors[0][1], +- DocTestMatches( +- "Traceback (most recent call last):\n" +- ' File "...testtools...runtest.py", line ..., in _run_user\n' +- " return fn(*args, **kwargs)\n..." +- " args = ...\n" +- " fn = ...\n" +- " kwargs = ...\n" +- " self = ...\n" +- ' File "...testtools...testcase.py", line ..., in _run_test_method\n' +- " return self._get_test_method()()\n..." +- " result = ...\n" +- " self = ...\n" +- ' File "...testtools...tests...test_testresult.py", ' +- "line ..., in error\n" +- " 1 / 0\n..." +- " a = 1\n" +- " self = ...\n" +- "ZeroDivisionError: ...\n", +- doctest.ELLIPSIS | doctest.REPORT_UDIFF, +- ), +- ) +- + def test_addDuration(self): + # addDuration stores test-duration pairs in collectedDurations + result = self.makeResult() diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..078e6cf --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +python-3.14-remove-broken-tests.patch diff --git a/debian/tests/control b/debian/tests/control index a909d41..a215d63 100644 --- a/debian/tests/control +++ b/debian/tests/control @@ -1,5 +1,5 @@ -Tests: testsuite-py3 +Tests: unittests Depends: @, @builddeps@, -Restrictions: allow-stderr +Restrictions: allow-stderr needs-root diff --git a/debian/tests/unittests b/debian/tests/unittests new file mode 100755 index 0000000..cee4115 --- /dev/null +++ b/debian/tests/unittests @@ -0,0 +1,7 @@ +#!/bin/sh + +set -e + +set -ex ; for pyvers in $(py3versions -rv 2>/dev/null); do \ + PYTHONPATH=`pwd` PYTHON=python$pyvers python$pyvers -m testtools.run tests.test_suite ; \ +done |
