Test the unmarked cited item's message and the file a non-UTF-8 read names

This commit is contained in:
2026-11-13 03:23:27 +01:00
parent ee241646e7
commit 45ecf0798e
2 changed files with 9 additions and 0 deletions
+7
View File
@@ -182,6 +182,13 @@ class PrepareScoring(unittest.TestCase):
junior = (self.root / ".local" / "state" / "larv-review" / "proj" / "scoring" / "junior-a.md").read_text()
self.assertIn("from a DIFFERENT version (main): `CLAUDE.md` and `AGENTS.md`, which it imports.", junior)
def test_names_a_file_that_is_not_utf_8(self):
(self.root / ".claude").mkdir()
(self.root / ".claude" / "CLAUDE.md").write_bytes(b"\xff")
with self.assertRaises(OSError) as raised:
preloaded_files(self.checkout, self.root)
self.assertEqual(str(raised.exception), f"{self.root}/.claude/CLAUDE.md: 'utf-8' codec can't decode byte 0xff in position 0: invalid start byte")
def test_leaves_out_a_claude_md_the_project_settings_exclude(self):
(self.root / ".claude").mkdir()
(self.root / ".claude" / "CLAUDE.md").write_text("# Home\n")