# Path: pypinyin/pinyin_dict.py

# 
# Path: pypinyin/contrib/tone_convert.py



from pytest import mark
from pypinyin import pinyin_dict
from pypinyin.contrib.tone_convert import (
    tone_to_normal,
    tone_to_tone2,
    tone2_to_tone,
    tone_to_tone3,
    tone3_to_tone,
    tone2_to_normal,
    tone2_to_tone3,
    tone3_to_tone2,
    tone3_to_normal,
    to_normal,
    to_tone,
    to_tone2,
    to_tone3,
    to_initials,
    to_finals,
    to_finals_tone,
    to_finals_tone2,
    to_finals_tone3,
)
    ['zho1ng', True, False, False, 'o1ng'],
    ['zhōng', False, False, False, 'o1ng'],
    ['zhong', False, False, True, 'o5ng'],
    ['yū', True, False, False, 'v1'],
    ['yu1', True, False, False, 'v1'],
    ['yū', True, True, False, 'ü1'],
    ['yū', False, False, False, 'u1'],
    ['yū', False, True, False, 'u1'],
])
def test_to_finals_tone2(pinyin, strict, v_to_u,
                         neutral_tone_with_five, result):
    assert to_finals_tone2(pinyin, strict=strict, v_to_u=v_to_u,
                           neutral_tone_with_five=neutral_tone_with_five
                           ) == result


@mark.parametrize('pinyin,strict,v_to_u,neutral_tone_with_five,result', [
    ['zhōng', True, False, False, 'ong1'],
    ['zhong1', True, False, False, 'ong1'],
    ['zho1ng', True, False, False, 'ong1'],
    ['zhōng', False, False, False, 'ong1'],
    ['zhong', False, False, True, 'ong5'],
    ['yū', True, False, False, 'v1'],
    ['yu1', True, False, False, 'v1'],
    ['yū', True, True, False, 'ü1'],
    ['yū', False, False, False, 'u1'],
    ['yū', False, True, False, 'u1'],
])
def test_to_finals_tone3(pinyin, strict, v_to_u, neutral_tone_with_five,
                         result):

# Path: pypinyin/pinyin_dict.py

# 
# Path: pypinyin/contrib/tone_convert.py



# Path: tests/contrib/test_tone_convert.py
from pytest import mark
from pypinyin import pinyin_dict
from pypinyin.contrib.tone_convert import (
    tone_to_normal,
    tone_to_tone2,
    tone2_to_tone,
    tone_to_tone3,
    tone3_to_tone,
    tone2_to_normal,
    tone2_to_tone3,
    tone3_to_tone2,
    tone3_to_normal,
    to_normal,
    to_tone,
    to_tone2,
    to_tone3,
    to_initials,
    to_finals,
    to_finals_tone,
    to_finals_tone2,
    to_finals_tone3,
)

    ['zho1ng', True, False, False, 'o1ng'],
    ['zhōng', False, False, False, 'o1ng'],
    ['zhong', False, False, True, 'o5ng'],
    ['yū', True, False, False, 'v1'],
    ['yu1', True, False, False, 'v1'],
    ['yū', True, True, False, 'ü1'],
    ['yū', False, False, False, 'u1'],
    ['yū', False, True, False, 'u1'],
])
def test_to_finals_tone2(pinyin, strict, v_to_u,
                         neutral_tone_with_five, result):
    assert to_finals_tone2(pinyin, strict=strict, v_to_u=v_to_u,
                           neutral_tone_with_five=neutral_tone_with_five
                           ) == result


@mark.parametrize('pinyin,strict,v_to_u,neutral_tone_with_five,result', [
    ['zhōng', True, False, False, 'ong1'],
    ['zhong1', True, False, False, 'ong1'],
    ['zho1ng', True, False, False, 'ong1'],
    ['zhōng', False, False, False, 'ong1'],
    ['zhong', False, False, True, 'ong5'],
    ['yū', True, False, False, 'v1'],
    ['yu1', True, False, False, 'v1'],
    ['yū', True, True, False, 'ü1'],
    ['yū', False, False, False, 'u1'],
    ['yū', False, True, False, 'u1'],
])
def test_to_finals_tone3(pinyin, strict, v_to_u, neutral_tone_with_five,
                         result):

    assert to_finals_tone3(pinyin, strict=strict, v_to_u=v_to_u,