Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
avocado
提交
82b09c6d
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,发现更多精彩内容 >>
提交
82b09c6d
编写于
9月 18, 2015
作者:
L
Lucas Meneghel Rodrigues
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #798 from ldoktor/fail2err
examples.tests: Rename failtest_nasty* to errortest_nasty*
上级
7234c717
6fe692b2
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
13 addition
and
13 deletion
+13
-13
examples/tests/errortest_nasty.py
examples/tests/errortest_nasty.py
+1
-1
examples/tests/errortest_nasty2.py
examples/tests/errortest_nasty2.py
+1
-1
examples/tests/errortest_nasty3.py
examples/tests/errortest_nasty3.py
+1
-1
selftests/functional/test_standalone.py
selftests/functional/test_standalone.py
+10
-10
未找到文件。
examples/tests/
fail
test_nasty.py
→
examples/tests/
error
test_nasty.py
浏览文件 @
82b09c6d
...
...
@@ -23,7 +23,7 @@ class FailTest(Test):
def
test
(
self
):
"""
Should fail not-that-badly
Avocado should report this as TestError.
"""
raise
NastyException
(
"Nasty-string-like-exception"
)
...
...
examples/tests/
fail
test_nasty2.py
→
examples/tests/
error
test_nasty2.py
浏览文件 @
82b09c6d
...
...
@@ -23,7 +23,7 @@ class FailTest(Test):
def
test
(
self
):
"""
Should fail
.
Avocado should report this as TestError
.
"""
raise
NastyException
(
None
)
# str(Exception) fails!
...
...
examples/tests/
fail
test_nasty3.py
→
examples/tests/
error
test_nasty3.py
浏览文件 @
82b09c6d
...
...
@@ -23,7 +23,7 @@ class FailTest(Test):
def
test
(
self
):
"""
Should fail not-that-badly
Avocado should report this as TestError.
"""
raise
NastyException
(
"Nasty-string-like-exception"
)
...
...
selftests/functional/test_standalone.py
浏览文件 @
82b09c6d
...
...
@@ -45,28 +45,28 @@ class StandaloneTests(unittest.TestCase):
expected_rc
=
1
self
.
run_and_check
(
cmd_line
,
expected_rc
,
'failtest'
)
def
test_
fail
test_nasty
(
self
):
cmd_line
=
'./examples/tests/
fail
test_nasty.py -r'
def
test_
error
test_nasty
(
self
):
cmd_line
=
'./examples/tests/
error
test_nasty.py -r'
expected_rc
=
1
result
=
self
.
run_and_check
(
cmd_line
,
expected_rc
,
'
fail
test_nasty'
)
result
=
self
.
run_and_check
(
cmd_line
,
expected_rc
,
'
error
test_nasty'
)
exc
=
"NastyException: Nasty-string-like-exception"
count
=
result
.
stdout
.
count
(
"
\n
%s"
%
exc
)
self
.
assertEqual
(
count
,
2
,
"Exception
\\
n%s should be present twice in"
"the log (once from the log, second time when parsing"
"exception details."
%
(
exc
))
def
test_
fail
test_nasty2
(
self
):
cmd_line
=
'./examples/tests/
fail
test_nasty2.py -r'
def
test_
error
test_nasty2
(
self
):
cmd_line
=
'./examples/tests/
error
test_nasty2.py -r'
expected_rc
=
1
result
=
self
.
run_and_check
(
cmd_line
,
expected_rc
,
'
fail
test_nasty2'
)
result
=
self
.
run_and_check
(
cmd_line
,
expected_rc
,
'
error
test_nasty2'
)
self
.
assertIn
(
"Exception: Unable to get exception, check the traceback"
" for details."
,
result
.
stdout
)
def
test_
fail
test_nasty3
(
self
):
cmd_line
=
'./examples/tests/
fail
test_nasty3.py -r'
def
test_
error
test_nasty3
(
self
):
cmd_line
=
'./examples/tests/
error
test_nasty3.py -r'
expected_rc
=
1
result
=
self
.
run_and_check
(
cmd_line
,
expected_rc
,
'
fail
test_nasty3'
)
self
.
assertIn
(
"TestError: <
fail
test_nasty3.NastyException instance at "
,
result
=
self
.
run_and_check
(
cmd_line
,
expected_rc
,
'
error
test_nasty3'
)
self
.
assertIn
(
"TestError: <
error
test_nasty3.NastyException instance at "
,
result
.
stdout
)
def
test_errortest
(
self
):
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录