Files
arena/tests/test_probe.py
T
karti d691acf131
arena-environments / validate (3.11) (push) Successful in 1m8s
arena-environments / validate (3.12) (push) Successful in 31s
Harden redaction-pressure reward and provenance
2026-08-19 01:26:21 -07:00

41 lines
1.0 KiB
Python

from __future__ import annotations
import subprocess
import sys
import unittest
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
ENVIRONMENTS = (
"redaction-pressure",
"canary-trap",
"fault-localisation",
"schema-migration",
)
class RootProbeIntegrationTests(unittest.TestCase):
def test_public_root_probe_gates_all_four_environments(self) -> None:
completed = subprocess.run(
[sys.executable, "probe.py"],
cwd=ROOT,
text=True,
capture_output=True,
timeout=30,
check=False,
)
self.assertEqual(
completed.returncode,
0,
msg=f"root probe failed:\nstdout:\n{completed.stdout}\nstderr:\n{completed.stderr}",
)
for environment in ENVIRONMENTS:
with self.subTest(environment=environment):
self.assertIn(environment, completed.stdout)
self.assertEqual(completed.stdout.count(" ok"), len(ENVIRONMENTS))
if __name__ == "__main__":
unittest.main()