mirror of
https://github.com/python/cpython.git
synced 2026-03-21 12:16:25 +00:00
bpo-30445: Allow appended output in RecursionError message (#3356)
Running under coverage sometimes causes 'in comparison' to be added to the end of the RecursionError message, which is acceptable.
Patched by Maria Mckinley
(cherry picked from commit 3480ef9dd3)
This commit is contained in:
parent
63b3f2b19c
commit
6fce7ea893
1 changed files with 2 additions and 1 deletions
|
|
@ -344,7 +344,8 @@ def f():
|
|||
# 2nd last line contains the repetition count
|
||||
self.assertEqual(actual[:-2], expected[:-2])
|
||||
self.assertRegex(actual[-2], expected[-2])
|
||||
self.assertEqual(actual[-1], expected[-1])
|
||||
# last line can have additional text appended
|
||||
self.assertIn(expected[-1], actual[-1])
|
||||
|
||||
# Check the recursion count is roughly as expected
|
||||
rec_limit = sys.getrecursionlimit()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue