]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-93883: Fix some tests involving traceback formatting (#94737)
authorJohn Belmonte <john@neggie.net>
Mon, 11 Jul 2022 09:22:41 +0000 (18:22 +0900)
committerGitHub <noreply@github.com>
Mon, 11 Jul 2022 09:22:41 +0000 (10:22 +0100)
PR #93994 was merged without being rebased in a few weeks, and
some new test code using the old scheme passed through automatic merge.

Lib/test/test_traceback.py

index 602bd2cae0a96b8bb20c1e348e85497c1cb7cbc5..ef08b29c6d360da0af2b92be5655d32d93bfc505 100644 (file)
@@ -740,7 +740,6 @@ class TracebackErrorLocationCaretTests(unittest.TestCase):
             f"Traceback (most recent call last):",
             f"  File \"{__file__}\", line {self.callable_line}, in get_exception",
             f"    callable()",
-            f"    ^^^^^^^^^^",
             f"  File \"{__file__}\", line {f.__code__.co_firstlineno + 2}, in f",
             f"    .method",
             f"     ^^^^^^",
@@ -757,10 +756,8 @@ class TracebackErrorLocationCaretTests(unittest.TestCase):
             f"Traceback (most recent call last):",
             f"  File \"{__file__}\", line {self.callable_line}, in get_exception",
             f"    callable()",
-            f"    ^^^^^^^^^^",
             f"  File \"{__file__}\", line {f.__code__.co_firstlineno + 2}, in f",
             f"    method",
-            f"    ^^^^^^",
         ]
         self.assertEqual(actual, expected)
 
@@ -774,7 +771,6 @@ class TracebackErrorLocationCaretTests(unittest.TestCase):
             f"Traceback (most recent call last):",
             f"  File \"{__file__}\", line {self.callable_line}, in get_exception",
             f"    callable()",
-            f"    ^^^^^^^^^^",
             f"  File \"{__file__}\", line {f.__code__.co_firstlineno + 2}, in f",
             f"    . method",
             f"      ^^^^^^",