fix(tests): preserve environment in formation subprocess tests to ensure xdist hermeticity
This commit is contained in:
parent
a5f67f95a4
commit
c0cd44307a
5 changed files with 10 additions and 5 deletions
|
|
@ -10,6 +10,7 @@ Per Phase 3 of ``docs/formation_pipeline_plan.md``:
|
|||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
import os
|
||||
|
||||
import subprocess
|
||||
import sys
|
||||
|
|
@ -236,7 +237,7 @@ class TestCrossSession:
|
|||
capture_output=True,
|
||||
text=True,
|
||||
cwd=str(repo_root),
|
||||
env={"PYTHONHASHSEED": "random", "PATH": ""},
|
||||
env={**os.environ, "PYTHONHASHSEED": "random", "PATH": ""},
|
||||
)
|
||||
assert result.stdout.strip() == in_proc
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
"""Tests for ``formation.templates.composed_relation``."""
|
||||
|
||||
from __future__ import annotations
|
||||
import os
|
||||
|
||||
import subprocess
|
||||
import sys
|
||||
|
|
@ -187,6 +188,6 @@ class TestCrossSession:
|
|||
[sys.executable, "-c", script],
|
||||
check=True, capture_output=True, text=True,
|
||||
cwd=str(repo_root),
|
||||
env={"PYTHONHASHSEED": "random", "PATH": ""},
|
||||
env={**os.environ, "PYTHONHASHSEED": "random", "PATH": ""},
|
||||
)
|
||||
assert result.stdout.strip() == in_proc
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
"""Tests for ``formation.templates.falsification``."""
|
||||
|
||||
from __future__ import annotations
|
||||
import os
|
||||
|
||||
import subprocess
|
||||
import sys
|
||||
|
|
@ -132,6 +133,6 @@ class TestCrossSession:
|
|||
[sys.executable, "-c", script],
|
||||
check=True, capture_output=True, text=True,
|
||||
cwd=str(repo_root),
|
||||
env={"PYTHONHASHSEED": "random", "PATH": ""},
|
||||
env={**os.environ, "PYTHONHASHSEED": "random", "PATH": ""},
|
||||
)
|
||||
assert result.stdout.strip() == in_proc
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
"""Tests for ``formation.templates.identity_anchor``."""
|
||||
|
||||
from __future__ import annotations
|
||||
import os
|
||||
|
||||
import subprocess
|
||||
import sys
|
||||
|
|
@ -154,6 +155,6 @@ class TestCrossSession:
|
|||
[sys.executable, "-c", script],
|
||||
check=True, capture_output=True, text=True,
|
||||
cwd=str(repo_root),
|
||||
env={"PYTHONHASHSEED": "random", "PATH": ""},
|
||||
env={**os.environ, "PYTHONHASHSEED": "random", "PATH": ""},
|
||||
)
|
||||
assert result.stdout.strip() == in_proc
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
"""Tests for ``formation.templates.procedural``."""
|
||||
|
||||
from __future__ import annotations
|
||||
import os
|
||||
|
||||
import subprocess
|
||||
import sys
|
||||
|
|
@ -157,6 +158,6 @@ class TestCrossSession:
|
|||
[sys.executable, "-c", script],
|
||||
check=True, capture_output=True, text=True,
|
||||
cwd=str(repo_root),
|
||||
env={"PYTHONHASHSEED": "random", "PATH": ""},
|
||||
env={**os.environ, "PYTHONHASHSEED": "random", "PATH": ""},
|
||||
)
|
||||
assert result.stdout.strip() == in_proc
|
||||
|
|
|
|||
Loading…
Reference in a new issue