diff options
Diffstat (limited to 'tests/misc/print_exception.py')
-rw-r--r-- | tests/misc/print_exception.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/misc/print_exception.py b/tests/misc/print_exception.py index 95431632f..08b2e4bc4 100644 --- a/tests/misc/print_exception.py +++ b/tests/misc/print_exception.py @@ -47,6 +47,16 @@ except Exception as e: print('caught') print_exc(e) +# Test that an exception propagated through a finally doesn't have a traceback added there +try: + try: + f() + finally: + print('finally') +except Exception as e: + print('caught') + print_exc(e) + # Here we have a function with lots of bytecode generated for a single source-line, and # there is an error right at the end of the bytecode. It should report the correct line. def f(): |