diff --git a/tests/test_debug.py b/tests/test_debug.py index d218c4e802..fbf2fff904 100644 --- a/tests/test_debug.py +++ b/tests/test_debug.py @@ -6,6 +6,7 @@ from werkzeug.debug import console from werkzeug.debug import DebuggedApplication +from werkzeug.debug import get_current_traceback from werkzeug.debug import get_machine_id from werkzeug.debug.console import HTMLStringO from werkzeug.debug.repr import debug_repr @@ -350,3 +351,12 @@ class MutableException(ValueError): except MutableException: # previously crashed: `TypeError: unhashable type 'MutableException'` Traceback(*sys.exc_info()) + + +def test_linked_exception_wo_traceback(): + try: + raise Exception("msg1") + except Exception as e: + e.__context__ = Exception("msg2") + # previously crashed: `IndexError: list index out of range` + get_current_traceback()