Ejemplo n.º 1
0
def test_match_all_words(line_for_A):
    char, name = parse(line_for_A)
    assert match(set(name.split()), name)
Ejemplo n.º 2
0
def test_match_two_words(line_for_A):
    char, name = parse(line_for_A)
    assert match(set(['CAPITAL', 'LATIN']), name)
Ejemplo n.º 3
0
def test_match_one_word(line_for_A):
    char, name = parse(line_for_A)
    assert match(set(['CAPITAL']), name)
Ejemplo n.º 4
0
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'
Ejemplo n.º 5
0
def test_parse_with_old_name(line_with_old_name):
    char, name = parse(line_with_old_name)
    assert char == '.'
    assert name == 'FULL STOP | PERIOD'
Ejemplo n.º 6
0
def test_simple_parse(line_for_A):
    char, name = parse(line_for_A)
    assert char == 'A'
    assert name == 'LATIN CAPITAL LETTER A'