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