From: codedragon Date: Wed, 24 May 2017 21:23:46 +0000 (-0700) Subject: bpo-30445: Allow appended output in RecursionError message X-Git-Tag: v3.7.0a1~742 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3480ef9dd3177be8c0d71a74853dca6e5b11fbe1;p=python 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 --- diff --git a/Lib/test/test_traceback.py b/Lib/test/test_traceback.py index 7276bc7ee7..e483353589 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()