Merge photo highlights by name and capture year

This commit is contained in:
2026-09-26 19:38:15 +01:00
parent 41c637eca9
commit d15ba78579
47 changed files with 221 additions and 9 deletions
+16 -2
View File
@@ -83,10 +83,24 @@ class PhotoHighlightTests(unittest.TestCase):
records.sort(reverse=True)
grouped = [record for record in records if record[1] in ARMENIA + ROMANIA]
self.assertEqual([record[1] for record in grouped], ROMANIA + ARMENIA)
self.assertEqual(grouped[0][2], "Romania")
self.assertEqual(grouped[9][2], "Armenia")
# Newer uploads now own the one link for each name/year.
self.assertIsNone(grouped[0][2])
self.assertIsNone(grouped[9][2])
self.assertIn("Transmission of Flesh by Erfan Ashourioun", grouped[11][3])
def test_iran_and_armenia_have_one_link_each_in_2026(self):
for name in ("Iran", "Armenia"):
anchors = []
for path in ART.glob("2026-*.md"):
content = path.read_text()
if f'anchor: "{name}"' in content:
anchors.append(path)
self.assertEqual(len(anchors), 1, (name, anchors))
iran = next(path for path in ART.glob("2026-*.md")
if 'anchor: "Iran"' in path.read_text())
self.assertIn("0b1781e580e6d0852728b6aab4f45f0eded30394ea8ff74d9d7ce8ae326bd172",
iran.name)
def test_2026_highlights_follow_supplied_chronology(self):
anchors = {}
for path in ART.glob("*photo-*.md"):