Tests: hide the running harness from in-process calls too, so the suite passes inside any harness
ci / test (push) Waiting to run
ci / test (push) Waiting to run
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
7e0ff4f7bf
commit
10688425c9
1 file changed
+5
@@ -94,6 +94,11 @@ class Core(unittest.TestCase):
|
||||
PYTHONPATH=py + (os.pathsep + os.environ["PYTHONPATH"] if os.environ.get("PYTHONPATH") else ""))
|
||||
for name in ("SISI_SESSION_ID", "CLAUDE_ENV_FILE", "XDG_DATA_HOME", "XDG_STATE_HOME", "CODEX_HOME", "CLAUDE_CODE_ENTRYPOINT"):
|
||||
self.env.pop(name, None)
|
||||
# in-process calls read os.environ: the harness this suite runs under must not leak in either
|
||||
hide = mock.patch.dict(os.environ)
|
||||
hide.start()
|
||||
self.addCleanup(hide.stop)
|
||||
os.environ.pop("CLAUDE_CODE_ENTRYPOINT", None)
|
||||
self.proj = self.project("alpha")
|
||||
if not self.ENFORCE: # these tests hold the reminders; tests/test_plan.py holds the denials
|
||||
os.makedirs(self.data, exist_ok=True)
|
||||
|
||||
Reference in new issue
Block a user