PySnooper/tests
kigland d5257380b2 Guard against f_lasti == -1 when detecting exception returns
The tracer reads co_code[frame.f_lasti] to decide whether a 'return' event was
caused by an exception. f_lasti can be -1 (e.g. a frame that hasn't executed
an instruction), and co_code[-1] reads the last byte -- the wrong opcode --
which can misreport a normal return as "Call ended by exception". Extract the
check into call_ended_by_exception() and return False when f_lasti < 0.
2026-06-08 11:57:40 -07:00
..
mini_toolbox Get rid of six, for reals 2021-02-27 11:04:37 +02:00
samples Show colored output 2022-01-14 20:36:54 +02:00
test_multiple_files Show colored output 2022-01-14 20:36:54 +02:00
test_utils Add support for Ansible zipped source files (#226) 2022-04-02 17:58:48 +03:00
__init__.py Add indentation tests with new assert_sample_output 2019-05-11 09:38:09 +03:00
test_chinese.py Show colored output 2022-01-14 20:36:54 +02:00
test_ended_by_exception.py Guard against f_lasti == -1 when detecting exception returns 2026-06-08 11:57:40 -07:00
test_mini_toolbox.py Fix bug in OutputCapturer 2020-05-05 14:18:18 +03:00
test_not_implemented.py Show colored output 2022-01-14 20:36:54 +02:00
test_pysnooper.py Format ExceptionGroup gracefully on Python 3.11+ 2026-03-08 12:51:15 +02:00
utils.py Make tests compatible with Python 3.10 2021-05-19 11:21:58 +03:00