def test_validators_plist_ufo3_fontinfo_success(): fontinfo_validator = plistvalidators.FontinfoPlistValidator( ufo3_test_success_path, 3, ufo3_dir_list) xml_fail_list = fontinfo_validator.run_xml_validation() ufolib_fail_list = fontinfo_validator.run_ufolib_import_validation() assert len(xml_fail_list) == 0 assert len(ufolib_fail_list) == 0
def test_validators_plist_ufo3_fontinfo_ufolib_import_fail(capsys): fontinfo_ufo_path = os.path.join(fontinfo_test_dir_failpath, 'UFO3-UFOlibError.ufo') fontinfo_validator = plistvalidators.FontinfoPlistValidator( fontinfo_ufo_path, 3, ufo3_dir_list) fail_list = fontinfo_validator.run_ufolib_import_validation() assert len(fail_list) == 1 assert 'fontinfo.plist' in fail_list[0].test_long_stdstream_string
def test_validators_plist_ufo2_fontinfo_xml_fail(capsys): fontinfo_ufo_path = os.path.join(fontinfo_test_dir_failpath, 'UFO2-XMLfi.ufo') fontinfo_validator = plistvalidators.FontinfoPlistValidator( fontinfo_ufo_path, 2, ufo2_dir_list) fail_list = fontinfo_validator.run_xml_validation() assert len(fail_list) == 1 assert 'fontinfo.plist' in fail_list[0].test_long_stdstream_string
def test_validators_plist_ufo3_fontinfo_missing_file_fail(capsys): fontinfo_ufo_path = os.path.join(fontinfo_test_dir_failpath, 'UFO3-MissingFI.ufo') fontinfo_validator = plistvalidators.FontinfoPlistValidator( fontinfo_ufo_path, 3, ufo3_dir_list) xml_fail_list = fontinfo_validator.run_xml_validation() ufolib_fail_list = fontinfo_validator.run_ufolib_import_validation() assert isinstance(xml_fail_list, list) assert isinstance(ufolib_fail_list, list) assert len(xml_fail_list) == 0 assert len(ufolib_fail_list) == 0