diff options
author | Ionel Cristian Mărieș <contact@ionelmc.ro> | 2017-04-07 23:50:57 +0300 |
---|---|---|
committer | Ionel Cristian Mărieș <contact@ionelmc.ro> | 2017-04-07 23:50:57 +0300 |
commit | fb49cd77cd0f3317bed4da508942012cca0c151d (patch) | |
tree | 14c7571058f6a3743e73a68346ac524cb5d1739f /README.rst | |
parent | 8f5a3eb1860161ad319833d259ece849cd5437e1 (diff) |
Add a test for #17 (broken traceback.clear_frames).
Diffstat (limited to 'README.rst')
-rw-r--r-- | README.rst | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -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 ======= |