travis-ci
12911 of 13174 relevant lines covered (98.0%)
1.47 hits per line
1 |
# -*- coding: utf-8 -*-
|
|
2 |
import unittest |
1 only TOX_ENV=單元試驗 ✔ |
3 |
from 臺灣言語工具.翻譯.摩西工具.無編碼器 import 無編碼器 |
1 only TOX_ENV=單元試驗 ✔ |
4 |
|
|
5 |
|
|
6 |
class 無編碼器單元試驗(unittest.TestCase): |
1 only TOX_ENV=單元試驗 ✔ |
7 |
def setUp(self): |
1 only TOX_ENV=單元試驗 ✔ |
8 |
self.編碼器 = 無編碼器()
|
1 only TOX_ENV=單元試驗 ✔ |
9 |
|
|
10 |
def tearDown(self): |
1 only TOX_ENV=單元試驗 ✔ |
11 |
pass
|
1 only TOX_ENV=單元試驗 ✔ |
12 |
|
|
13 |
def test_𪜶飼pig(self): |
1 only TOX_ENV=單元試驗 ✔ |
14 |
原 = '𪜶飼pig'
|
1 only TOX_ENV=單元試驗 ✔ |
15 |
後 = '\\U0002a736\\u98fcpig'
|
1 only TOX_ENV=單元試驗 ✔ |
16 |
self.assertEqual(self.編碼器.編碼(原), 原) |
1 only TOX_ENV=單元試驗 ✔ |
17 |
self.assertEqual(self.編碼器.解碼(後), 後) |
1 only TOX_ENV=單元試驗 ✔ |
18 |
self.assertEqual(self.編碼器.解碼(self.編碼器.編碼(原)), 原) |
1 only TOX_ENV=單元試驗 ✔ |
19 |
self.assertEqual(self.編碼器.編碼(self.編碼器.解碼(後)), 後) |
1 only TOX_ENV=單元試驗 ✔ |