Skip to content

Commit 3480ef9

Browse files
codedragonzware
authored andcommitted
bpo-30445: Allow appended output in RecursionError message
Running under coverage sometimes causes 'in comparison' to be added to the end of the RecursionError message, which is acceptable. Patched by Maria Mckinley
1 parent 7c2f82d commit 3480ef9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_traceback.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,8 @@ def f():
344344
# 2nd last line contains the repetition count
345345
self.assertEqual(actual[:-2], expected[:-2])
346346
self.assertRegex(actual[-2], expected[-2])
347-
self.assertEqual(actual[-1], expected[-1])
347+
# last line can have additional text appended
348+
self.assertIn(expected[-1], actual[-1])
348349

349350
# Check the recursion count is roughly as expected
350351
rec_limit = sys.getrecursionlimit()

0 commit comments

Comments
 (0)