Install Python's SIGINT handler for the reflex-bench interrupt tests
Merged
BE
20d ago+6+6+0123456789-0-0-0123456789
test_interrupted_run_saves_the_finished_benchmarks and test_interrupted_run_keeps_the_named_baseline fail when the test runner was started with SIGINT ignored, e.g. in a CI job or a background shell:
assert 0 == 130
+ where 0 = <Result okay>.exit_code
+ and 130 = cli.EXIT_INTERRUPTED
_thread.interrupt_main() only simulates SIGINT when Python handles it; with an inherited SIG_IGN it does nothing, so the benchmark samples normally and the run exits cleanly. The interrupting fixture now installs signal.default_int_handler for the test and restores the previous handler afterwards.
Reproduce on main: (trap '' INT; uv run pytest tests/units/reflex_bench/test_cli.py -k interrupted) → 2 failed; with this change all 80 tests in the file pass with and without the trap.
Test-only change, no news fragment.