Fail the tests that skipped at run time, naming what they miss, and give CI's tests docker

This commit is contained in:
2026-11-18 17:33:04 +01:00
parent fa34d832aa
commit 9cc505b764
11 changed files with 37 additions and 39 deletions
+4 -4
View File
@@ -18,7 +18,7 @@ import unittest
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
from test_env import isolated_env
from test_env import assert_not_root, isolated_env
from project_config.test_project_config import write_config
BIN = pathlib.Path(__file__).resolve().parents[1]
@@ -753,8 +753,8 @@ class Cycles(unittest.TestCase):
self.assertIn("past the noise", run.stdout)
self.assertIn("past the noise", run.calls[1]["stdin"])
@unittest.skipIf(os.geteuid() == 0, "root reads an unreadable file")
def test_exits_1_when_the_transcript_cannot_be_read(self):
assert_not_root(self)
checkout = Checkout(self)
run = checkout.run([worker(unreadable=True)])
self.assertEqual((run.code, run.roles()), (1, ["worker"]))
@@ -1000,8 +1000,8 @@ class Interrupt(unittest.TestCase):
self.assertFalse(run.calls[2]["ctrl_c_ignored"])
self.assertIn("[human] B", run.calls[3]["stdin"])
@unittest.skipIf(os.geteuid() == 0, "root reads an unreadable file")
def test_exits_1_when_the_transcript_cannot_be_read_after_the_interrupt(self):
assert_not_root(self)
checkout = Checkout(self)
run = checkout.run([worker(say="A or B?"), judge(interrupt=True, evidence="A or B?", question="A or B?"), interrupt(type="B", unreadable=True)], terminal_input="/talk\n", before_typing=ANSWERING)
self.assertEqual((run.code, run.roles()), (1, ["worker", "judge", "interrupt"]))
@@ -1082,8 +1082,8 @@ class Models(unittest.TestCase):
self.assertIn("no model catalog cached", run.stderr)
self.assertEqual(argument(run.calls[0], "--model"), "1")
@unittest.skipIf(os.geteuid() == 0, "root writes into a read-only directory")
def test_exits_1_when_the_models_file_cannot_be_written(self):
assert_not_root(self)
checkout = Checkout(self)
del checkout.env["LOOP_CLAUDE_JUDGE_MODEL"], checkout.env["LOOP_CLAUDE_WORKER_MODEL"]
checkout.models_file().parent.mkdir(parents=True, mode=0o500)