def test_match_all_words(line_for_A): char, name = parse(line_for_A) assert match(set(name.split()), name)
def test_match_two_words(line_for_A): char, name = parse(line_for_A) assert match(set(['CAPITAL', 'LATIN']), name)
def test_match_one_word(line_for_A): char, name = parse(line_for_A) assert match(set(['CAPITAL']), name)
def test_parse_with_reduntant_old_name(): line = '00BD;VULGAR FRACTION ONE HALF;No;0;ON;<fraction> 0031 2044 0032;;;1/2;N;FRACTION ONE HALF;;;;' char, name = parse(line) assert name == 'VULGAR FRACTION ONE HALF'
def test_parse_with_old_name(line_with_old_name): char, name = parse(line_with_old_name) assert char == '.' assert name == 'FULL STOP | PERIOD'
def test_simple_parse(line_for_A): char, name = parse(line_for_A) assert char == 'A' assert name == 'LATIN CAPITAL LETTER A'