summaryrefslogtreecommitdiff
path: root/README.rst
diff options
context:
space:
mode:
authorIonel Cristian Mărieș <contact@ionelmc.ro>2017-04-07 23:50:57 +0300
committerIonel Cristian Mărieș <contact@ionelmc.ro>2017-04-07 23:50:57 +0300
commitfb49cd77cd0f3317bed4da508942012cca0c151d (patch)
tree14c7571058f6a3743e73a68346ac524cb5d1739f /README.rst
parent8f5a3eb1860161ad319833d259ece849cd5437e1 (diff)
Add a test for #17 (broken traceback.clear_frames).
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst20
1 files changed, 20 insertions, 0 deletions
diff --git a/README.rst b/README.rst
index b2d227c..2e877d8 100644
--- a/README.rst
+++ b/README.rst
@@ -617,6 +617,26 @@ What if we have a local call stack ?
Exception: Guessing time !
<BLANKLINE>
+Other weird stuff
+`````````````````
+
+Clearing traceback works (Python 3.4 and up)::
+
+ >>> tb = Traceback.from_string("""
+ ... File "skipped.py", line 123, in func_123
+ ... Traceback (most recent call last):
+ ... File "tests/examples.py", line 2, in func_a
+ ... func_b()
+ ... File "tests/examples.py", line 6, in func_b
+ ... func_c()
+ ... File "tests/examples.py", line 10, in func_c
+ ... func_d()
+ ... File "tests/examples.py", line 14, in func_d
+ ... Doesn't: matter
+ ... """)
+ >>> import traceback, sys
+ >>> if sys.version_info > (3, 4):
+ ... traceback.clear_frames(tb)
Credits
=======