Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
avocado
提交
4b6ba388
A
avocado
项目概览
openeuler
/
avocado
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
avocado
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
4b6ba388
编写于
1月 02, 2018
作者:
A
Amador Pahim
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'clebergnu-python3_port_2'
Signed-off-by:
N
Amador Pahim
<
apahim@redhat.com
>
上级
25299fdb
fa8cb14c
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
17 addition
and
11 deletion
+17
-11
examples/tests/errortest_nasty3.py
examples/tests/errortest_nasty3.py
+1
-1
optional_plugins/html/avocado_result_html/__init__.py
optional_plugins/html/avocado_result_html/__init__.py
+2
-3
requirements-travis.txt
requirements-travis.txt
+1
-1
requirements.txt
requirements.txt
+1
-1
scripts/avocado
scripts/avocado
+2
-2
scripts/avocado-run-testplan
scripts/avocado-run-testplan
+2
-2
selftests/unit/test_xunit.py
selftests/unit/test_xunit.py
+8
-1
未找到文件。
examples/tests/errortest_nasty3.py
浏览文件 @
4b6ba388
...
...
@@ -27,7 +27,7 @@ class FailTest(Test):
"""
Avocado should report this as TestError.
"""
raise
NastyException
(
"Nasty-string-like-exception"
)
raise
NastyException
(
"Nasty-string-like-exception"
)
# pylint: disable=E0710
if
__name__
==
"__main__"
:
...
...
optional_plugins/html/avocado_result_html/__init__.py
浏览文件 @
4b6ba388
...
...
@@ -222,10 +222,9 @@ class HTMLResult(Result):
setsid
=
getattr
(
os
,
'setsid'
,
None
)
if
not
setsid
:
setsid
=
getattr
(
os
,
'setpgrp'
,
None
)
inout
=
file
(
os
.
devnull
,
"r+"
)
cmd
=
[
'xdg-open'
,
html_path
]
subprocess
.
Popen
(
cmd
,
close_fds
=
True
,
stdin
=
inout
,
stdout
=
inout
,
stderr
=
inout
,
subprocess
.
Popen
(
cmd
,
close_fds
=
True
,
stdin
=
subprocess
.
DEVNULL
,
stdout
=
subprocess
.
DEVNULL
,
stderr
=
subprocess
.
DEVNULL
,
preexec_fn
=
setsid
)
def
_render
(
self
,
result
,
output_path
):
...
...
requirements-travis.txt
浏览文件 @
4b6ba388
...
...
@@ -14,7 +14,7 @@ mock==1.2.0; python_version <= '2.7'
aexpect==1.4.0
psutil==3.1.1
# six is a stevedore depedency, but we also use it directly
six==1.
9
.0
six==1.
10
.0
# stevedore for loading "new style" plugins
stevedore==1.20.0
lxml>=3.4.4
...
...
requirements.txt
浏览文件 @
4b6ba388
...
...
@@ -4,6 +4,6 @@ pyliblzma>=0.5.3
# REST client (avocado.core.restclient)
requests
>=1.2.3
# six is a stevedore depedency, but we also use it directly
six
>=1.
9
.0
six
>=1.
10
.0
# stevedore for loading "new style" plugins
stevedore
>=0.14
scripts/avocado
浏览文件 @
4b6ba388
...
...
@@ -38,7 +38,7 @@ def handle_exception(*exc_info):
try
:
import
time
prefix
+=
time
.
strftime
(
"%F_%T"
)
+
"-"
from
avocado.core
import
data_dir
from
avocado.core
import
data_dir
# pylint: disable=E0611
_crash_dir
=
os
.
path
.
join
(
data_dir
.
get_data_dir
(),
"crashes"
)
os
.
makedirs
(
_crash_dir
)
crash_dir
=
_crash_dir
...
...
@@ -58,7 +58,7 @@ def handle_exception(*exc_info):
if
__name__
==
'__main__'
:
sys
.
excepthook
=
handle_exception
from
avocado.core.app
import
AvocadoApp
from
avocado.core.app
import
AvocadoApp
# pylint: disable=E0611
# Override tmp in case it's not set in env
for
attr
in
(
"TMP"
,
"TEMP"
,
"TMPDIR"
):
...
...
scripts/avocado-run-testplan
浏览文件 @
4b6ba388
...
...
@@ -31,13 +31,13 @@ class Parser(argparse.ArgumentParser):
prog
=
'avocado-run-testplan'
,
description
=
'Tracks manual test plans progress and results'
)
self
.
add_argument
(
'-t'
,
'--template'
,
type
=
file
,
self
.
add_argument
(
'-t'
,
'--template'
,
type
=
argparse
.
FileType
(
'r'
)
,
help
=
'Template file with the predefined test plan'
)
self
.
add_argument
(
'-o'
,
'--output'
,
help
=
'Output (test plan results) file location'
)
self
.
add_argument
(
'-i'
,
'--input'
,
type
=
file
,
self
.
add_argument
(
'-i'
,
'--input'
,
type
=
argparse
.
FileType
(
'r'
)
,
help
=
(
'A previously saved result file to use. This '
'will show a human readable report for the '
'given result file'
))
...
...
selftests/unit/test_xunit.py
浏览文件 @
4b6ba388
...
...
@@ -3,7 +3,6 @@ import os
import
shutil
import
tempfile
import
unittest
from
lxml
import
etree
from
xml.dom
import
minidom
try
:
...
...
@@ -11,6 +10,12 @@ try:
except
:
from
BytesIO
import
BytesIO
try
:
from
lxml
import
etree
SCHEMA_CAPABLE
=
True
except
ImportError
:
SCHEMA_CAPABLE
=
False
from
avocado
import
Test
from
avocado.core
import
job
from
avocado.core.result
import
Result
...
...
@@ -56,6 +61,8 @@ class xUnitSucceedTest(unittest.TestCase):
os
.
remove
(
self
.
tmpfile
[
1
])
shutil
.
rmtree
(
self
.
tmpdir
)
@
unittest
.
skipUnless
(
SCHEMA_CAPABLE
,
'Unable to validate schema due to missing lxml.etree library'
)
def
test_add_success
(
self
):
self
.
test_result
.
start_test
(
self
.
test1
)
self
.
test_result
.
end_test
(
self
.
test1
.
get_state
())
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录