[test] Don’t skip subset tests early

Check for FontTools only when the checksums are mismatching.
This commit is contained in:
Khaled Hosny 2021-08-04 04:20:14 +02:00
parent b084153317
commit 9f544e5008
1 changed files with 5 additions and 2 deletions

View File

@ -18,8 +18,7 @@ from subset_test_suite import SubsetTestSuite
try:
from fontTools.ttLib import TTFont
except ImportError:
print ("fonttools is not present, skipping test.")
sys.exit (77)
TTFont = None
ots_sanitize = shutil.which ("ots-sanitize")
@ -72,6 +71,10 @@ def run_test (test, should_check_ots):
if expected_hash == actual_hash:
return 0
if TTFont is None:
print ("fonttools is not present, skipping test.")
sys.exit (77)
expected_ttx = io.StringIO ()
try:
with TTFont (expected_file) as font: