Exemplo n.º 1
0
def test_handles_CJK_character():
    character = element_for(root, '漢')
    kanji = kanji_data(character)
    output = json.dumps(kanji, indent=2, ensure_ascii=False)
    assert output == '''{
Exemplo n.º 2
0
def test_handles_kanji_with_multiple_stroke_counts():
    character = element_for(root, '逢')
    kanji = kanji_data(character)
    output = json.dumps(kanji, indent=2, ensure_ascii=False)
    assert output == '''{
Exemplo n.º 3
0
def test_kanji_data_xml():
    character = element_for(root, '亜')
    kanji = kanji_data(character)
    output = json.dumps(kanji, indent=2, ensure_ascii=False)
    assert output == '''{
Exemplo n.º 4
0
def test_handles_kanji_without_grades():
    character = element_for(root, '唖')
    kanji = kanji_data(character)
    output = json.dumps(kanji, indent=2, ensure_ascii=False)
    assert output == '''{
Exemplo n.º 5
0
def test_reading_data():
    character = element_for(root, '亜')
    kanjis = [kanji_data(character)]
    readings = reading_data(kanjis)
    output = json.dumps(readings, indent=2, ensure_ascii=False)
    assert output == '''[