This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients Rosuav, abarry, ethan.furman, georg.brandl, ncoghlan, xiang.zhang
Date 2016-04-22.05:23:54
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1461302635.09.0.0412746766523.issue26823@psf.upfronthosting.co.za>
In-reply-to
Content
For testing, you can create a recursive scenario that terminates with an exception after a defined number of iterations:

>>> def f(counter):
...     if counter:
...         f(counter-1)
...     else:
...         raise RuntimeError
... 
>>> f(3)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 3, in f
  File "<stdin>", line 3, in f
  File "<stdin>", line 3, in f
  File "<stdin>", line 5, in f
RuntimeError

It's probably also worth checking the handling of two distinct frame repetitions by having another recursion counter that terminates itself by calling the one that terminates by raising an exception

Beyond that, https://hg.python.org/cpython/file/tip/Lib/test/test_traceback.py covers both traceback formatting implementations, so a new test case in TracebackFormatTests seems appropriate.
History
Date User Action Args
2016-04-22 05:23:55ncoghlansetrecipients: + ncoghlan, georg.brandl, ethan.furman, Rosuav, xiang.zhang, abarry
2016-04-22 05:23:55ncoghlansetmessageid: <1461302635.09.0.0412746766523.issue26823@psf.upfronthosting.co.za>
2016-04-22 05:23:55ncoghlanlinkissue26823 messages
2016-04-22 05:23:55ncoghlancreate