Skip to content

Commit 8dec311

Browse files
authored
Add check for OFOC images (#2249)
* Add check for OFOC images This PR adds a unit test checking that each OFOC member has a corresponding photo in the images/ofoc folder that corresponds to their github handle * Simplify for png only * Update test_memberships.py * Update test_memberships.py
1 parent cd31191 commit 8dec311

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tests/test_memberships.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
HERE = Path(__file__).parent.resolve()
1515
ROOT = HERE.parent.resolve()
1616
DATA = ROOT.joinpath("_data")
17+
OFOC_IMAGES = ROOT.joinpath("images", "ofoc")
1718

1819

1920
class Affiliation(BaseModel):
@@ -65,6 +66,10 @@ def test_data(self):
6566
""".rstrip()
6667
),
6768
)
69+
self.assertTrue(
70+
OFOC_IMAGES.joinpath(person.github).with_suffix(".png").is_file(),
71+
msg=f"{person.name} is missing a photo in {OFOC_IMAGES} that matches their github handle",
72+
)
6873

6974
def test_encoding(self):
7075
"""Test correct encoding."""

0 commit comments

Comments
 (0)