diff --git a/bin/test_citations.py b/bin/test_citations.py index 4da16446..6b3864dd 100644 --- a/bin/test_citations.py +++ b/bin/test_citations.py @@ -21,4 +21,5 @@ class Citations(unittest.TestCase): self.assertEqual([f"{path}: {stray}" for path, text in texts for stray in STRAY.findall(text)], [], 'spell a citation `CLAUDE.md` → "Vocabulary"') cited = [(path, NAME.findall(run)) for path, text in texts for run in CITATION.findall(text)] self.assertTrue(cited) - self.assertEqual([f"{path}: {names}" for path, names in cited if names[0] not in headings or set(names[1:]) - leads], []) + unresolved = [(path, name) for path, names in cited for name in [n for n in names[:1] if n not in headings] + [n for n in names[1:] if n not in leads]] + self.assertEqual([f"{path}: {name}" for path, name in unresolved], [], "the first name is a heading of CLAUDE.md, each later one a heading or a bold lead")