]> git.ipfire.org Git - thirdparty/google/fonts.git/commitdiff
.ci/test_profiles.py: Skip image checks if designer profile does not have any 9231/head
authorMarc Foley <m.foley.88@gmail.com>
Wed, 19 Mar 2025 13:57:24 +0000 (13:57 +0000)
committerMarc Foley <m.foley.88@gmail.com>
Wed, 19 Mar 2025 13:57:24 +0000 (13:57 +0000)
.ci/test_profiles.py

index 61ad7cb22c88e18d118fae928ab31fc285013609..ab6159f7322c09590a8a612151a29a9c4ee70998 100644 (file)
@@ -13,7 +13,7 @@ from google.protobuf import text_format
 @pytest.fixture
 def profile_dir():
     if len(sys.argv) != 3:
-        print("Usage: python test_profiles fonts/catalog/designers/designerprofile")
+        print("Usage: pytest .ci/test_profiles.py ./catalog/designers/designerprofile")
         sys.exit(1)
     return sys.argv[-1]
 
@@ -63,6 +63,9 @@ def test_profile_dir_has_info(profile_dir):
 
 def test_profile_info_image_link_is_correct(profile_dir, proto_info):
     img_path = proto_info.avatar.file_name
+    # Images are optional so we can skip this test if there is no image
+    if img_path == "":
+        return
     assert img_path in os.listdir(profile_dir), "info.pb: image path is incorrect"