Skip to content

Commit b66cfad

Browse files
committed
Isolate fake stdio processes from command resolution
1 parent 797d113 commit b66cfad

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎tests/client/test_stdio.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,9 @@ def install_fake_process(
199199
"""
200200
terminated: list[FakeProcess] = []
201201

202+
async def fake_get_executable_command(command: str) -> str:
203+
return command
204+
202205
async def fake_spawn(
203206
command: str,
204207
args: list[str],
@@ -212,6 +215,7 @@ async def fake_terminate_tree(proc: FakeProcess) -> None:
212215
terminated.append(proc)
213216
proc.exit(-15)
214217

218+
monkeypatch.setattr(stdio, "_get_executable_command", fake_get_executable_command)
215219
monkeypatch.setattr(stdio, "_create_platform_compatible_process", fake_spawn)
216220
monkeypatch.setattr(stdio, "_terminate_process_tree", fake_terminate_tree)
217221
if grace_period is not None:

0 commit comments

Comments
 (0)