summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_traceback.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-09-05 23:07:44 (GMT)
committerGitHub <noreply@github.com>2017-09-05 23:07:44 (GMT)
commit6fce7ea893dc3f69b607dd6ef48c2d3d0f6ca414 (patch)
tree1f5c2a6c7e1aabfa43629bfa27082939b6a6ceb7 /Lib/test/test_traceback.py
parent63b3f2b19cc96801c3b8619e4cf8aa9028e7a33c (diff)
downloadcpython-6fce7ea893dc3f69b607dd6ef48c2d3d0f6ca414.zip
cpython-6fce7ea893dc3f69b607dd6ef48c2d3d0f6ca414.tar.gz
cpython-6fce7ea893dc3f69b607dd6ef48c2d3d0f6ca414.tar.bz2
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 3480ef9dd3177be8c0d71a74853dca6e5b11fbe1)
Diffstat (limited to 'Lib/test/test_traceback.py')
-rw-r--r--Lib/test/test_traceback.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_traceback.py b/Lib/test/test_traceback.py
index 7276bc7..e483353 100644
--- a/Lib/test/test_traceback.py
+++ b/Lib/test/test_traceback.py
@@ -344,7 +344,8 @@ class TracebackFormatTests(unittest.TestCase):
# 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()