Skip to content

Commit 2a8c009

Browse files
committed
test: preserve platform environment in hash-seed check
1 parent 2bfde6c commit 2a8c009

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

tests/test_prompt_cache.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
import asyncio
1414
import json
15+
import os
1516
import subprocess
1617
import sys
1718
from pathlib import Path
@@ -72,12 +73,14 @@ def test_surface_is_byte_identical_across_hash_seeds() -> None:
7273
)
7374
outputs = []
7475
for seed in ("0", "1", "424242"):
76+
env = os.environ.copy()
77+
env["PYTHONHASHSEED"] = seed
7578
proc = subprocess.run(
7679
[sys.executable, "-c", script],
7780
cwd=REPO_ROOT,
7881
capture_output=True,
7982
text=True,
80-
env={"PYTHONHASHSEED": seed, "PATH": "/usr/bin:/bin"},
83+
env=env,
8184
check=True,
8285
)
8386
outputs.append(proc.stdout.strip())

0 commit comments

Comments
 (0)