Example #1
0
def test_tone2_tone3(pinyin, result):
    assert tone2_to_tone3(pinyin) == result
    assert to_tone3(pinyin) == result

    assert tone3_to_tone2(result) == pinyin
    assert to_tone2(result) == pinyin
    assert to_tone2(pinyin) == pinyin
Example #2
0
def test_tone_tone2_with_neutral_tone_with_five(
        pinyin, neutral_tone_with_five, result):
    assert tone_to_tone2(
        pinyin, neutral_tone_with_five=neutral_tone_with_five) == result
    assert tone_to_tone2(
        pinyin, neutral_tone_with_5=neutral_tone_with_five) == result
    assert to_tone2(pinyin,
                    neutral_tone_with_five=neutral_tone_with_five) == result
    assert to_tone2(pinyin,
                    neutral_tone_with_5=neutral_tone_with_five) == result

    assert tone2_to_tone(result) == pinyin
    assert to_tone(result) == pinyin
Example #3
0
def test_tone_tone2_with_v_to_u(pinyin, v_to_u, result):
    assert tone_to_tone2(pinyin, v_to_u=v_to_u) == result
    assert to_tone2(pinyin, v_to_u=v_to_u) == result
Example #4
0
def test_tone_tone2(pinyin, result):
    assert tone_to_tone2(pinyin) == result
    assert to_tone2(pinyin) == result