travis-ci
12911 of 13174 relevant lines covered (98.0%)
1.47 hits per line
1 |
# -*- coding: utf-8 -*-
|
|
2 |
from 臺灣言語工具.系統整合.程式腳本 import 程式腳本 |
6 all except TOX_ENV=國教院整合試驗 and TOX_ENV=文本整合試驗 ✔ |
3 |
|
|
4 |
|
|
5 |
class 安裝程式腳本(程式腳本): |
6 all except TOX_ENV=國教院整合試驗 and TOX_ENV=文本整合試驗 ✔ |
6 |
pull深度 = '100'
|
6 all except TOX_ENV=國教院整合試驗 and TOX_ENV=文本整合試驗 ✔ |
7 |
|
|
8 |
@classmethod
|
6 all except TOX_ENV=國教院整合試驗 and TOX_ENV=文本整合試驗 ✔ |
9 |
def _下載專案(cls, 專案git路徑): |
|
10 |
try:
|
2 only TOX_ENV=Moses整合試驗 and TOX_ENV=中研院整合試驗 ✔ |
11 |
cls._走指令([ |
2 only TOX_ENV=Moses整合試驗 and TOX_ENV=中研院整合試驗 ✔ |
12 |
'git', 'clone', |
|
13 |
'--depth', cls.pull深度,
|
|
14 |
專案git路徑 |
|
15 |
]) |
|
16 |
except OSError: |
× |
17 |
cls._走指令([ |
× |
18 |
'git', 'clone', |
|
19 |
專案git路徑 |
|
20 |
]) |
|
21 |
|
|
22 |
@classmethod
|
6 all except TOX_ENV=國教院整合試驗 and TOX_ENV=文本整合試驗 ✔ |
23 |
def _更新專案(cls): |
|
24 |
try:
|
3 only TOX_ENV=HTS整合試驗, TOX_ENV=HTK整合試驗, and TOX_ENV=Moses整合試驗 ✔ |
25 |
cls._走指令( |
3 only TOX_ENV=HTS整合試驗, TOX_ENV=HTK整合試驗, and TOX_ENV=Moses整合試驗 ✔ |
26 |
['git', 'pull', '--depth', cls.pull深度], |
|
27 |
愛直接顯示輸出=True
|
|
28 |
) |
|
29 |
except OSError: |
× |
30 |
cls._走指令( |
× |
31 |
['git', 'pull'], |
|
32 |
愛直接顯示輸出=True
|
|
33 |
) |