Skip to content

Commit

Permalink
Update name_test.py
Browse files Browse the repository at this point in the history
change assert_PASS to assert_results_contain and check for correct msg code (which assert_PASS apparently does not do).
  • Loading branch information
josh-hadley committed Oct 8, 2023
1 parent f30e747 commit f5a4e7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/profiles/name_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ def test_check_name_postscript_characters():

# Test a font that has psname with allowed characters. Check should PASS.
ttFont = TTFont(TEST_FILE("source-sans-pro/OTF/SourceSansPro-Bold.otf"))
assert_PASS(check(ttFont), "psname-ok")
assert_results_contain(check(ttFont), PASS, "psname-characters-ok")

# Change it to a string with disallowed characters. Should FAIL.
bad_ps_name = "(disallowed) characters".encode("utf-16-be")
Expand All @@ -677,7 +677,7 @@ def test_check_name_postscript_hyphens():

# Test a font that has OK psname. Check should PASS.
ttFont = TTFont(TEST_FILE("source-sans-pro/OTF/SourceSansPro-Bold.otf"))
assert_PASS(check(ttFont), "psname-ok")
assert_results_contain(check(ttFont), PASS, "psname-hyphens-ok")

# Change the PostScript name string to more than one hyphen. Should FAIL.
bad_ps_name = "more-than-one-hyphen".encode("utf-16-be")
Expand Down

0 comments on commit f5a4e7a

Please sign in to comment.