travis-ci
12710 of 12943 relevant lines covered (98.2%)
1.44 hits per line
1 |
# -*- coding: utf-8 -*-
|
|
2 |
import telnetlib |
1 only TOX_ENV=單元試驗 ✔ |
3 |
|
|
4 |
|
|
5 |
class 自設剖析用戶端: |
1 only TOX_ENV=單元試驗 ✔ |
6 |
主機 = "140.113.207.101"
|
1 only TOX_ENV=單元試驗 ✔ |
7 |
埠 = 23222
|
1 only TOX_ENV=單元試驗 ✔ |
8 |
|
|
9 |
def 剖析(self, 愛轉換的字串): |
1 only TOX_ENV=單元試驗 ✔ |
10 |
大五碼字串 = 愛轉換的字串.encode('big5')
|
1 only TOX_ENV=單元試驗 ✔ |
11 |
連線 = telnetlib.Telnet(self.主機, self.埠, 0.5) |
1 only TOX_ENV=單元試驗 ✔ |
12 |
連線.write(大五碼字串) |
1 only TOX_ENV=單元試驗 ✔ |
13 |
結果 = 連線.read_all().decode('big5')
|
1 only TOX_ENV=單元試驗 ✔ |
14 |
連線.close() |
1 only TOX_ENV=單元試驗 ✔ |
15 |
return 結果.replace('\r', '').rstrip().split('\n') |
1 only TOX_ENV=單元試驗 ✔ |