test(hooks): quote the marker path in the interrupt test's hook script

An unquoted redirect target breaks if the pytest tmp dir contains a
space: the hook then never writes its pid and the test waits out the
300 s hook instead of failing fast. The neighbouring tests in this file
are unquoted, so only the new test is changed here.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
yotamleo
2026-09-11 23:52:01 +02:00
committed by Teknium
parent bca94759d5
commit f8fbf7c385

View File

@@ -164,7 +164,7 @@ def test_interrupt_kills_hook_and_propagates(tmp_path):
"""
marker = tmp_path / "hook.pid"
script = tmp_path / "hook.sh"
script.write_text(f"#!/bin/bash\necho $$ > {marker}\nsleep 300\n")
script.write_text(f'#!/bin/bash\necho $$ > "{marker}"\nsleep 300\n')
script.chmod(0o755)
def interrupt_once_running():