[interpolatable_test] Test VarComposite

This commit is contained in:
Behdad Esfahbod 2023-01-31 13:44:20 -07:00
parent 0f1eb4673c
commit b821141eb7

View File

@ -35,9 +35,9 @@ class InterpolatableTest(unittest.TestCase):
shutil.rmtree(self.tempdir)
@staticmethod
def get_test_input(test_file_or_folder):
def get_test_input(*test_file_or_folder):
path, _ = os.path.split(__file__)
return os.path.join(path, "data", test_file_or_folder)
return os.path.join(path, "data", *test_file_or_folder)
@staticmethod
def get_file_list(folder, suffix, prefix=""):
@ -93,6 +93,15 @@ class InterpolatableTest(unittest.TestCase):
otf_paths = self.get_file_list(self.tempdir, suffix)
self.assertIsNone(interpolatable_main(otf_paths))
def test_interpolatable_varComposite(self):
input_path = self.get_test_input(
"..", "..", "ttLib", "data", "varc-ac00-ac01.ttf"
)
# This particular test font which was generated by machine-learning
# exhibits an "error" in one of the masters; it's a false-positive.
# Just make sure the code runs.
interpolatable_main((input_path,))
if __name__ == "__main__":
sys.exit(unittest.main())