test(mobile): verify Windows host ancestry and 0.1.4 runtime integration
This commit is contained in:
1 parent
5f75dcc99a
commit
f960716483
2 files changed
+13
-1
No files matched your search
@@ -7,6 +7,7 @@ import threading
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
import psutil
|
||||
|
||||
from tui_gateway.compute_host import ComputeHost, HostSession
|
||||
|
||||
@@ -49,7 +50,11 @@ def test_compute_host_line_json_seed_turn_interrupt():
|
||||
try:
|
||||
hello = _read_json_line(out)
|
||||
assert hello["type"] == "hello"
|
||||
assert hello["host_pid"] == proc.pid
|
||||
# Native Windows venv python.exe is a redirector: Popen owns the shim
|
||||
# while the actual Python child reports its own PID. Verify the real
|
||||
# process ancestry instead of mistaking that topology for a host bug.
|
||||
reported = psutil.Process(hello["host_pid"])
|
||||
assert proc.pid in {reported.pid, *(parent.pid for parent in reported.parents())}
|
||||
|
||||
proc.stdin.write(json.dumps({"type": "session.seed", "sid": "s1", "request_id": "seed"}) + "\n")
|
||||
proc.stdin.flush()
|
||||
|
||||
Reference in new issue
Block a user