Skip to content

Commit

Permalink
Minor refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
khaledhosny committed Feb 25, 2024
1 parent e5ace4d commit 3f6c401
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions tests/checks/opentype/head_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,21 +200,12 @@ def test_check_mac_style():

for macStyle_value, style, expected in test_cases:
ttFont["head"].macStyle = macStyle_value
font = MockFont(ttFont=ttFont, style=style)
reason = f"with macStyle:{macStyle_value} style:{style}..."

if expected == PASS:
assert_PASS(
check(MockFont(ttFont=ttFont, style=style)),
"with macStyle:{macStyle_value} style:{style}...",
)
assert_PASS(check(font), reason)
elif expected == SKIP:
assert_SKIP(
check(MockFont(ttFont=ttFont, style=style)),
"with macStyle:{macStyle_value} style:{style}...",
)
assert_SKIP(check(font), reason)
else:
assert_results_contain(
check(MockFont(ttFont=ttFont, style=style)),
FAIL,
expected,
f"with macStyle:{macStyle_value} style:{style}...",
)
assert_results_contain(check(font), FAIL, expected, reason)

0 comments on commit 3f6c401

Please sign in to comment.