Skip to content

Commit 648f455

Browse files
committed
Make the test a bit more interesting
Change one of the instances subfamily instead of the font’s family name.
1 parent 8d4e766 commit 648f455

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/test_checks_name.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,10 @@ def test_check_instances_name_length_req(check, test_ttFont):
9696

9797
assert_PASS(check(test_ttFont), "with a good font...")
9898

99+
instance = test_ttFont["fvar"].instances[0]
99100
test_ttFont_bad = copy.deepcopy(test_ttFont)
100101
for rec in test_ttFont_bad["name"].names:
101-
if rec.nameID in (NameID.FONT_FAMILY_NAME, NameID.TYPOGRAPHIC_FAMILY_NAME):
102+
if rec.nameID == instance.subfamilyNameID:
102103
rec.string = "A" * 32
103104
assert_results_contain(check(test_ttFont_bad), FAIL, "long-name")
104105

0 commit comments

Comments
 (0)