travis-ci
12911 of 13174 relevant lines covered (98.0%)
1.47 hits per line
1 |
# -*- coding: utf-8 -*-
|
|
2 |
from unittest.case import TestCase |
1 only TOX_ENV=單元試驗 ✔ |
3 |
from 臺灣言語工具.解析整理.解析錯誤 import 解析錯誤 |
1 only TOX_ENV=單元試驗 ✔ |
4 |
from 臺灣言語工具.語音合成.閩南語音韻.變調.隨前變調 import 隨前變調 |
1 only TOX_ENV=單元試驗 ✔ |
5 |
|
|
6 |
|
|
7 |
class 隨前變調單元試驗(TestCase): |
1 only TOX_ENV=單元試驗 ✔ |
8 |
|
|
9 |
def test_一般韻_裡(self): |
1 only TOX_ENV=單元試驗 ✔ |
10 |
原本 = ('l', 'i', '2') |
1 only TOX_ENV=單元試驗 ✔ |
11 |
變調了 = ('l', 'i', '7') |
1 only TOX_ENV=單元試驗 ✔ |
12 |
self.assertEqual(隨前變調('7').變調(原本), 變調了) |
1 only TOX_ENV=單元試驗 ✔ |
13 |
|
|
14 |
def test_喉入聲_矣(self): |
1 only TOX_ENV=單元試驗 ✔ |
15 |
原本 = ('ʔ', 'ah', '4') |
1 only TOX_ENV=單元試驗 ✔ |
16 |
變調了 = ('ʔ', 'a', '3') |
1 only TOX_ENV=單元試驗 ✔ |
17 |
self.assertEqual(隨前變調('3').變調(原本), 變調了) |
1 only TOX_ENV=單元試驗 ✔ |
18 |
|
|
19 |
def test_ptk入聲_揣無例(self): |
1 only TOX_ENV=單元試驗 ✔ |
20 |
with self.assertRaises(解析錯誤): |
1 only TOX_ENV=單元試驗 ✔ |
21 |
隨前變調('7').變調(('g', 'iap', '8')) |
1 only TOX_ENV=單元試驗 ✔ |