travis-ci
12710 of 12943 relevant lines covered (98.2%)
1.44 hits per line
1 |
# -*- coding: utf-8 -*-
|
|
2 |
|
|
3 |
|
|
4 |
class 輕聲: |
2 only TOX_ENV=單元試驗 and TOX_ENV=HTS整合試驗 ✔ |
5 |
輕聲調 = '3'
|
2 only TOX_ENV=單元試驗 and TOX_ENV=HTS整合試驗 ✔ |
6 |
入聲輕聲調 = '10'
|
2 only TOX_ENV=單元試驗 and TOX_ENV=HTS整合試驗 ✔ |
7 |
喉入聲變調規則 = {'4': '3', '8': '3'} |
2 only TOX_ENV=單元試驗 and TOX_ENV=HTS整合試驗 ✔ |
8 |
入聲變調規則 = {'4': '10', '8': '10'} |
2 only TOX_ENV=單元試驗 and TOX_ENV=HTS整合試驗 ✔ |
9 |
變調規則 = {'1': '3', '2': '3', '3': '3', '5': '3', '7': '3', '0': '3'} |
2 only TOX_ENV=單元試驗 and TOX_ENV=HTS整合試驗 ✔ |
10 |
|
|
11 |
@classmethod
|
2 only TOX_ENV=單元試驗 and TOX_ENV=HTS整合試驗 ✔ |
12 |
def 變調(cls, 音): |
|
13 |
聲, 韻, 調 = 音 |
1 only TOX_ENV=單元試驗 ✔ |
14 |
if 韻.endswith('ʔ') or 韻.endswith('h'): |
1 only TOX_ENV=單元試驗 ✔ |
15 |
調 = cls.輕聲調 |
1 only TOX_ENV=單元試驗 ✔ |
16 |
韻 = 韻[:-1]
|
1 only TOX_ENV=單元試驗 ✔ |
17 |
elif 韻.endswith('p') or 韻.endswith('t') or 韻.endswith('k'): |
1 only TOX_ENV=單元試驗 ✔ |
18 |
調 = cls.入聲輕聲調 |
1 only TOX_ENV=單元試驗 ✔ |
19 |
else:
|
|
20 |
調 = cls.輕聲調 |
1 only TOX_ENV=單元試驗 ✔ |
21 |
return (聲, 韻, 調)
|
1 only TOX_ENV=單元試驗 ✔ |