test: run fork-guard contract subprocesses with python -I

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Yujong Lee 2026-09-19 18:08:19 +00:00
parent 752647d146
commit 1bcd8d704f

View file

@ -54,7 +54,7 @@ def test_compiled_extension_forbids_the_master_and_frees_its_workers() -> None:
env = {**os.environ, "OBJC_DISABLE_INITIALIZE_FORK_SAFETY": "YES"}
result = subprocess.run(
[sys.executable, "-c", _NATIVE_CONTRACT], capture_output=True, text=True, timeout=60, env=env
[sys.executable, "-I", "-c", _NATIVE_CONTRACT], capture_output=True, text=True, timeout=60, env=env
)
assert result.returncode == 0, result.stderr
@ -144,7 +144,7 @@ def test_sdk_call_in_a_child_forked_after_native_use_raises_instead_of_hanging()
}
result = subprocess.run(
[sys.executable, "-c", _SDK_CONTRACT], capture_output=True, text=True, timeout=120, env=env
[sys.executable, "-I", "-c", _SDK_CONTRACT], capture_output=True, text=True, timeout=120, env=env
)
assert result.returncode == 0, result.stderr