File: python-3.14-remove-broken-tests.patch

package info (click to toggle)
python-testtools 2.8.2-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,388 kB
  • sloc: python: 15,033; makefile: 127; sh: 7
file content (105 lines) | stat: -rw-r--r-- 4,290 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
Description: Remove broken tests in Python 3.14
Author: Thomas Goirand <zigo@debian.org>
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()