Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
avocado
提交
6fcdf4be
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,发现更多精彩内容 >>
未验证
提交
6fcdf4be
编写于
6月 12, 2017
作者:
A
Amador Pahim
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'clebergnu-release_51_fixes'
Signed-off-by:
N
Amador Pahim
<
apahim@redhat.com
>
上级
ac3fca8f
ac2e3c83
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
24 addition
and
13 deletion
+24
-13
avocado/core/loader.py
avocado/core/loader.py
+9
-6
avocado/core/varianter.py
avocado/core/varianter.py
+5
-5
docs/source/conf.py
docs/source/conf.py
+6
-0
selftests/unit/test_safeloader.py
selftests/unit/test_safeloader.py
+1
-1
setup.py
setup.py
+1
-1
spell.ignore
spell.ignore
+2
-0
未找到文件。
avocado/core/loader.py
浏览文件 @
6fcdf4be
...
...
@@ -658,22 +658,25 @@ class FileLoader(TestLoader):
docstring
=
ast
.
get_docstring
(
statement
)
# Looking for a class that has in the docstring either
# ":avocado: enable" or ":avocado: disable
if
(
safeloader
.
check_docstring_directive
(
docstring
,
'disable'
)
and
class_name
is
None
):
has_disable
=
safeloader
.
check_docstring_directive
(
docstring
,
'disable'
)
if
(
has_disable
and
class_name
is
None
):
continue
cl_tags
=
safeloader
.
get_docstring_directives_tags
(
docstring
)
if
(
safeloader
.
check_docstring_directive
(
docstring
,
'enable'
)
and
class_name
is
None
):
has_enable
=
safeloader
.
check_docstring_directive
(
docstring
,
'enable'
)
if
(
has_enable
and
class_name
is
None
):
info
=
self
.
_get_methods_info
(
statement
.
body
,
cl_tags
)
result
[
statement
.
name
]
=
info
continue
# Looking for the 'recursive' docstring or a 'class_name'
# (meaning we are under recursion)
if
(
safeloader
.
check_docstring_directive
(
docstring
,
'recursive'
)
or
class_name
is
not
None
):
has_recurse
=
safeloader
.
check_docstring_directive
(
docstring
,
'recursive'
)
if
(
has_recurse
or
class_name
is
not
None
):
info
=
self
.
_get_methods_info
(
statement
.
body
,
cl_tags
)
result
[
statement
.
name
]
=
info
...
...
avocado/core/varianter.py
浏览文件 @
6fcdf4be
...
...
@@ -456,17 +456,17 @@ class Varianter(object):
'variant_id': str,
'variant': [(str, [(str, str, object), ...])],
{'mux_path': ['/run/*'],
'variant_id': '
aaa
-26c0'
'variant': [('/
foo/aaa
',
[('/
foo', 'bar', 'baz
'),
('/
foo/aaa', 'bbb', 'ccc
')])]}
'variant_id': '
cat
-26c0'
'variant': [('/
pig/cat
',
[('/
pig', 'ant', 'fox
'),
('/
pig/cat', 'dog', 'bee
')])]}
...]
where `dump_tree_nodes` looks like::
[(node.path, environment_representation),
(node.path, [(path1, key1, value1), (path2, key2, value2), ...]),
('/
foo/aaa', [('/foo', 'bar', 'baz
')])
('/
pig/cat', [('/pig', 'ant', 'fox
')])
:return: loadable Varianter representation
"""
...
...
docs/source/conf.py
浏览文件 @
6fcdf4be
# -*- coding: utf-8 -*-
import
errno
import
importlib
import
os
import
sys
...
...
@@ -123,6 +124,11 @@ The following pages document the private APIs of optional Avocado plugins.
"""
)
for
path
in
os
.
walk
(
optional_plugins_path
).
next
()[
1
]:
name
=
"avocado_%s"
%
os
.
path
.
basename
(
path
)
try
:
importlib
.
import_module
(
name
)
except
ImportError
:
continue
path
=
os
.
path
.
join
(
optional_plugins_path
,
path
,
name
)
if
not
os
.
path
.
exists
(
path
):
continue
...
...
selftests/unit/test_safeloader.py
浏览文件 @
6fcdf4be
...
...
@@ -127,7 +127,7 @@ class DocstringDirectives(unittest.TestCase):
def
test_directives_regex
(
self
):
"""
Tests the
documented regexes for dealing
with docstring directives
Tests the
regular expressions that deal
with docstring directives
"""
for
directive
in
self
.
VALID_DIRECTIVES
:
self
.
assertRegexpMatches
(
directive
,
safeloader
.
DOCSTRING_DIRECTIVE_RE
)
...
...
setup.py
浏览文件 @
6fcdf4be
...
...
@@ -104,7 +104,7 @@ def get_long_description():
if
__name__
==
'__main__'
:
# Force "make develop" inside
READTHEDOCS
environment
# Force "make develop" inside
the "readthedocs.org"
environment
if
os
.
environ
.
get
(
"READTHEDOCS"
)
and
"install"
in
sys
.
argv
:
os
.
system
(
"make develop"
)
setup
(
name
=
'avocado-framework'
,
...
...
spell.ignore
浏览文件 @
6fcdf4be
...
...
@@ -432,3 +432,5 @@ fc
ps
bsd
unexecuted
lossy
readthedocs
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录