def test_validators_plist_ufo3_groups_xml_fail(): groups_ufo_path = os.path.join(groups_test_dir_failpath, 'UFO3-XMLgr.ufo') groups_validator = plistvalidators.GroupsPlistValidator( groups_ufo_path, 3, ufo3_dir_list) fail_list = groups_validator.run_xml_validation() assert len(fail_list) == 1 assert 'groups.plist' in fail_list[0].test_long_stdstream_string
def test_validators_plist_ufo3_groups_success(): groups_validator = plistvalidators.GroupsPlistValidator( ufo3_test_success_path, 3, ufo3_dir_list) xml_fail_list = groups_validator.run_xml_validation() ufolib_fail_list = groups_validator.run_ufolib_import_validation() assert len(xml_fail_list) == 0 assert len(ufolib_fail_list) == 0
def test_validators_plist_ufo2_groups_ufo_import_fail(): groups_ufo_path = os.path.join(groups_test_dir_failpath, 'UFO2-UFOlibError.ufo') groups_validator = plistvalidators.GroupsPlistValidator( groups_ufo_path, 2, ufo2_dir_list) fail_list = groups_validator.run_ufolib_import_validation() assert len(fail_list) == 1 assert 'groups.plist' in fail_list[0].test_long_stdstream_string
def test_validators_plist_ufo3_groups_missing_file_fail(): groups_ufo_path = os.path.join(groups_test_dir_failpath, 'UFO3-MissingGroups.ufo') groups_validator = plistvalidators.GroupsPlistValidator( groups_ufo_path, 3, ufo3_dir_list) xml_fail_list = groups_validator.run_xml_validation() ufolib_fail_list = groups_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