You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
618 B
17 lines
618 B
from pytest import mark
|
|
|
|
from pypinyin.contrib._tone_rule import right_mark_index
|
|
|
|
# http://www.hwjyw.com/resource/content/2010/06/04/8183.shtml
|
|
|
|
|
|
@mark.parametrize(
|
|
'input,expected',
|
|
[['da', 1], ['shuai', 3], ['guang', 2], ['zai', 1], ['po', 1], ['tou', 1],
|
|
['qiong', 2], ['ge', 1], ['jie', 2], ['teng', 1], ['yue', 2], ['lüe', 2],
|
|
['lve', 2], ['ji', 1], ['qing', 1], ['hu', 1], ['lü', 1], ['zhi', 2],
|
|
['chi', 2], ['hui', 2], ['qiu', 2], ['n', 0], ['ng', 0], ['m', 0],
|
|
['ê', 0], ['233', None]])
|
|
def test_right_mark_index(input, expected):
|
|
assert right_mark_index(input) == expected
|