Skip to content

Commit be3c68e

Browse files
committed
test: patch is_interrupted where the environment reads it
Hermes moved the interrupt helpers out of tools.interrupt.
1 parent d2780d6 commit be3c68e

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

‎tests/test_execution.py‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,6 @@ def test_timeout_kills_the_command_and_keeps_the_sandbox(fake):
129129

130130
def test_interrupt_kills_the_command_not_the_sandbox(fake, monkeypatch):
131131
"""Ctrl-C during a command targets the command by pid."""
132-
from tools import interrupt as interrupt_mod
133-
134132
env = make_env()
135133
env._ensure_ready()
136134
sandbox = fake.only()
@@ -141,8 +139,7 @@ def test_interrupt_kills_the_command_not_the_sandbox(fake, monkeypatch):
141139
def _is_interrupted(*args, **kwargs):
142140
return interrupted.is_set()
143141

144-
monkeypatch.setattr(interrupt_mod, "is_interrupted", _is_interrupted)
145-
monkeypatch.setattr("tools.environments.base.is_interrupted", _is_interrupted, raising=False)
142+
monkeypatch.setattr("tools.environments.base.is_interrupted", _is_interrupted)
146143

147144
timer = threading.Timer(0.4, interrupted.set)
148145
timer.start()

0 commit comments

Comments
 (0)