Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
avocado
提交
38f4f2ed
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,发现更多精彩内容 >>
未验证
提交
38f4f2ed
编写于
7月 08, 2016
作者:
A
Amador Pahim
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Massive spelling correction
Signed-off-by:
N
Amador Pahim
<
apahim@redhat.com
>
上级
8b84df5c
变更
26
隐藏空白更改
内联
并排
Showing
26 changed file
with
40 addition
and
39 deletion
+40
-39
avocado/core/app.py
avocado/core/app.py
+1
-1
avocado/core/loader.py
avocado/core/loader.py
+1
-1
avocado/core/multiplexer.py
avocado/core/multiplexer.py
+3
-3
avocado/core/output.py
avocado/core/output.py
+2
-2
avocado/core/restclient/cli/parser.py
avocado/core/restclient/cli/parser.py
+1
-1
avocado/core/restclient/connection.py
avocado/core/restclient/connection.py
+2
-2
avocado/core/safeloader.py
avocado/core/safeloader.py
+2
-2
avocado/core/status.py
avocado/core/status.py
+1
-1
avocado/core/test.py
avocado/core/test.py
+1
-1
avocado/core/tree.py
avocado/core/tree.py
+1
-1
avocado/plugins/distro.py
avocado/plugins/distro.py
+1
-1
avocado/utils/asset.py
avocado/utils/asset.py
+1
-1
avocado/utils/astring.py
avocado/utils/astring.py
+1
-1
avocado/utils/aurl.py
avocado/utils/aurl.py
+1
-1
avocado/utils/data_structures.py
avocado/utils/data_structures.py
+1
-1
avocado/utils/distro.py
avocado/utils/distro.py
+3
-3
avocado/utils/gdb.py
avocado/utils/gdb.py
+2
-2
avocado/utils/iso9660.py
avocado/utils/iso9660.py
+3
-3
avocado/utils/path.py
avocado/utils/path.py
+1
-1
avocado/utils/process.py
avocado/utils/process.py
+1
-1
avocado/utils/service.py
avocado/utils/service.py
+2
-2
avocado/utils/software_manager.py
avocado/utils/software_manager.py
+1
-1
docs/source/RunningTestsRemotely.rst
docs/source/RunningTestsRemotely.rst
+4
-3
selftests/functional/test_basic.py
selftests/functional/test_basic.py
+1
-1
selftests/unit/test_tree.py
selftests/unit/test_tree.py
+1
-1
selftests/unit/test_utils_asset.py
selftests/unit/test_utils_asset.py
+1
-1
未找到文件。
avocado/core/app.py
浏览文件 @
38f4f2ed
...
@@ -56,7 +56,7 @@ class AvocadoApp(object):
...
@@ -56,7 +56,7 @@ class AvocadoApp(object):
if
self
.
cli_dispatcher
.
extensions
:
if
self
.
cli_dispatcher
.
extensions
:
self
.
cli_dispatcher
.
map_method
(
'run'
,
self
.
parser
.
args
)
self
.
cli_dispatcher
.
map_method
(
'run'
,
self
.
parser
.
args
)
except
SystemExit
as
e
:
except
SystemExit
as
e
:
# If someon
t
e tries to exit Avocado, we should first close the
# If someone tries to exit Avocado, we should first close the
# STD_OUTPUT and only then exit.
# STD_OUTPUT and only then exit.
setattr
(
self
.
parser
.
args
,
'paginator'
,
'off'
)
setattr
(
self
.
parser
.
args
,
'paginator'
,
'off'
)
output
.
reconfigure
(
self
.
parser
.
args
)
output
.
reconfigure
(
self
.
parser
.
args
)
...
...
avocado/core/loader.py
浏览文件 @
38f4f2ed
...
@@ -135,7 +135,7 @@ class TestLoaderProxy(object):
...
@@ -135,7 +135,7 @@ class TestLoaderProxy(object):
loaders
=
(
loaders
[:
idx
]
+
[
plugin
for
plugin
in
supported_loaders
loaders
=
(
loaders
[:
idx
]
+
[
plugin
for
plugin
in
supported_loaders
if
plugin
not
in
loaders
]
+
if
plugin
not
in
loaders
]
+
loaders
[
idx
+
1
:])
loaders
[
idx
+
1
:])
while
"@DEFAULT"
in
loaders
:
# Remove duplic
i
te @DEFAULT entries
while
"@DEFAULT"
in
loaders
:
# Remove duplic
a
te @DEFAULT entries
loaders
.
remove
(
"@DEFAULT"
)
loaders
.
remove
(
"@DEFAULT"
)
loaders
=
[
_
.
split
(
':'
,
1
)
for
_
in
loaders
]
loaders
=
[
_
.
split
(
':'
,
1
)
for
_
in
loaders
]
...
...
avocado/core/multiplexer.py
浏览文件 @
38f4f2ed
...
@@ -75,7 +75,7 @@ class MuxTree(object):
...
@@ -75,7 +75,7 @@ class MuxTree(object):
pools
.
append
(
pool
)
pools
.
append
(
pool
)
pools
=
itertools
.
product
(
*
pools
)
pools
=
itertools
.
product
(
*
pools
)
while
True
:
while
True
:
# TODO: Implement 2nd level filter
e
s here
# TODO: Implement 2nd level filters here
# TODO: This part takes most of the time, optimize it
# TODO: This part takes most of the time, optimize it
yield
list
(
itertools
.
chain
(
*
pools
.
next
()))
yield
list
(
itertools
.
chain
(
*
pools
.
next
()))
...
@@ -372,7 +372,7 @@ class AvocadoParam(object):
...
@@ -372,7 +372,7 @@ class AvocadoParam(object):
def
iteritems
(
self
):
def
iteritems
(
self
):
"""
"""
Very basic implementation which iterates through __ALL__ params,
Very basic implementation which iterates through __ALL__ params,
which generates lots of duplic
i
te entries due to inherited values.
which generates lots of duplic
a
te entries due to inherited values.
"""
"""
for
leaf
in
self
.
_leaves
:
for
leaf
in
self
.
_leaves
:
for
key
,
value
in
leaf
.
environment
.
iteritems
():
for
key
,
value
in
leaf
.
environment
.
iteritems
():
...
@@ -405,7 +405,7 @@ class Mux(object):
...
@@ -405,7 +405,7 @@ class Mux(object):
"""
"""
:return: overall number of tests * multiplex variants
:return: overall number of tests * multiplex variants
"""
"""
# Currently number of tests is symetrical
# Currently number of tests is sym
m
etrical
if
self
.
variants
:
if
self
.
variants
:
no_variants
=
sum
(
1
for
_
in
self
.
variants
)
no_variants
=
sum
(
1
for
_
in
self
.
variants
)
if
no_variants
>
1
:
if
no_variants
>
1
:
...
...
avocado/core/output.py
浏览文件 @
38f4f2ed
...
@@ -274,7 +274,7 @@ class StdOutput(object):
...
@@ -274,7 +274,7 @@ class StdOutput(object):
def
print_records
(
self
):
def
print_records
(
self
):
"""
"""
Prints all stored messages as they occured into streams they were
Prints all stored messages as they occur
r
ed into streams they were
produced for.
produced for.
"""
"""
for
stream
,
msg
in
self
.
records
:
for
stream
,
msg
in
self
.
records
:
...
@@ -677,7 +677,7 @@ def log_plugin_failures(failures):
...
@@ -677,7 +677,7 @@ def log_plugin_failures(failures):
"""
"""
Log in the application UI failures to load a set of plugins
Log in the application UI failures to load a set of plugins
:param failures: a list of load failures, usually com
m
ing from a
:param failures: a list of load failures, usually coming from a
:class:`avocado.core.dispatcher.Dispatcher`
:class:`avocado.core.dispatcher.Dispatcher`
attribute `load_failures`
attribute `load_failures`
"""
"""
...
...
avocado/core/restclient/cli/parser.py
浏览文件 @
38f4f2ed
...
@@ -44,7 +44,7 @@ class Parser(argparse.ArgumentParser):
...
@@ -44,7 +44,7 @@ class Parser(argparse.ArgumentParser):
def
_add_global_arguments
(
self
):
def
_add_global_arguments
(
self
):
'''
'''
Add global arguments, that is, do not depend on a specifc command
Add global arguments, that is, do not depend on a specif
i
c command
'''
'''
connection_group
=
self
.
add_argument_group
(
connection_group
=
self
.
add_argument_group
(
'CONNECTION'
,
'CONNECTION'
,
...
...
avocado/core/restclient/connection.py
浏览文件 @
38f4f2ed
...
@@ -130,7 +130,7 @@ class Connection(object):
...
@@ -130,7 +130,7 @@ class Connection(object):
:type path: str
:type path: str
:param method: the method you want to call on the remote server,
:param method: the method you want to call on the remote server,
defaults to a HTTP GET
defaults to a HTTP GET
:param check_status: wether to check the HTTP status code that comes
:param check_status: w
h
ether to check the HTTP status code that comes
with the response. If set to `True`, it will
with the response. If set to `True`, it will
depend on the method chosen. If set to `False`,
depend on the method chosen. If set to `False`,
no check will be performed. If an integer is given
no check will be performed. If an integer is given
...
@@ -194,7 +194,7 @@ class Connection(object):
...
@@ -194,7 +194,7 @@ class Connection(object):
def
get_api_list
(
self
):
def
get_api_list
(
self
):
"""
"""
Gets the list of APIs the server makes availble to the current user
Gets the list of APIs the server makes avail
a
ble to the current user
"""
"""
return
self
.
request
(
''
)
return
self
.
request
(
''
)
...
...
avocado/core/safeloader.py
浏览文件 @
38f4f2ed
...
@@ -24,10 +24,10 @@ from ..utils import data_structures
...
@@ -24,10 +24,10 @@ from ..utils import data_structures
def
modules_imported_as
(
module
):
def
modules_imported_as
(
module
):
"""
"""
Returns a mapping of imported module names wether using aliases or not
Returns a mapping of imported module names w
h
ether using aliases or not
The goal of this utility function is to return the name of the import
The goal of this utility function is to return the name of the import
as used in the rest of the module, wether an aliased import was used
as used in the rest of the module, w
h
ether an aliased import was used
or not.
or not.
For code such as:
For code such as:
...
...
avocado/core/status.py
浏览文件 @
38f4f2ed
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
"""
"""
Maps the different status strings in avocado to booleans.
Maps the different status strings in avocado to booleans.
This is used by methods and functions to return a cut and dry answer to wether
This is used by methods and functions to return a cut and dry answer to w
h
ether
a test or a job in avocado PASSed or FAILed.
a test or a job in avocado PASSed or FAILed.
"""
"""
...
...
avocado/core/test.py
浏览文件 @
38f4f2ed
...
@@ -189,7 +189,7 @@ class Test(unittest.TestCase):
...
@@ -189,7 +189,7 @@ class Test(unittest.TestCase):
self
.
log
.
warn
=
self
.
log
.
warning
=
record_and_warn
self
.
log
.
warn
=
self
.
log
.
warning
=
record_and_warn
if
_incorrect_name
is
not
None
:
if
_incorrect_name
is
not
None
:
self
.
log
.
warn
(
"The 'name' argument has to be TestName instance, "
self
.
log
.
warn
(
"The 'name' argument has to be TestName instance, "
"not string. In the upcom
m
ing releases this will "
"not string. In the upcoming releases this will "
"become an exception. (%s)"
,
self
.
name
.
name
)
"become an exception. (%s)"
,
self
.
name
.
name
)
if
tag
is
not
None
:
# TODO: Remove in release 0.37
if
tag
is
not
None
:
# TODO: Remove in release 0.37
self
.
log
.
warn
(
"The 'tag' argument is not supported and will be "
self
.
log
.
warn
(
"The 'tag' argument is not supported and will be "
...
...
avocado/core/tree.py
浏览文件 @
38f4f2ed
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
#
#
"""
"""
Tree data strucure with nodes.
Tree data struc
t
ure with nodes.
This tree structure (Tree drawing code) was inspired in the base tree data
This tree structure (Tree drawing code) was inspired in the base tree data
structure of the ETE 2 project:
structure of the ETE 2 project:
...
...
avocado/plugins/distro.py
浏览文件 @
38f4f2ed
...
@@ -262,7 +262,7 @@ def load_from_tree(name, version, release, arch, package_type, path):
...
@@ -262,7 +262,7 @@ def load_from_tree(name, version, release, arch, package_type, path):
:param release: the release or minor version of the distribution.
:param release: the release or minor version of the distribution.
Usually this is also a single number, that is often
Usually this is also a single number, that is often
omitted or starts with a 0 when the major version
omitted or starts with a 0 when the major version
is initially release. It's ofte
r
associated with a
is initially release. It's ofte
n
associated with a
shorter development cycle that contains incremental
shorter development cycle that contains incremental
a collection of improvements and fixes.
a collection of improvements and fixes.
:type release: str
:type release: str
...
...
avocado/utils/asset.py
浏览文件 @
38f4f2ed
...
@@ -13,7 +13,7 @@
...
@@ -13,7 +13,7 @@
# Author: Amador Pahim <apahim@redhat.com>
# Author: Amador Pahim <apahim@redhat.com>
"""
"""
Asset fetcher from multiple locations
s
Asset fetcher from multiple locations
"""
"""
import
errno
import
errno
...
...
avocado/utils/astring.py
浏览文件 @
38f4f2ed
...
@@ -97,7 +97,7 @@ def strip_console_codes(output, custom_codes=None):
...
@@ -97,7 +97,7 @@ def strip_console_codes(output, custom_codes=None):
:param custom_codes: The codes added to the console codes which is not
:param custom_codes: The codes added to the console codes which is not
covered in the default codes
covered in the default codes
:type output: string
:type output: string
:return: the string wihout any special codes
:return: the string wi
t
hout any special codes
:rtype: string
:rtype: string
"""
"""
if
"
\x1b
"
not
in
output
:
if
"
\x1b
"
not
in
output
:
...
...
avocado/utils/aurl.py
浏览文件 @
38f4f2ed
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
"""
"""
URL related functions.
URL related functions.
The strange name is to avoid accidental naming colisions in code.
The strange name is to avoid accidental naming col
l
isions in code.
"""
"""
try
:
try
:
...
...
avocado/utils/data_structures.py
浏览文件 @
38f4f2ed
...
@@ -63,7 +63,7 @@ def compare_matrices(matrix1, matrix2, threshold=0.05):
...
@@ -63,7 +63,7 @@ def compare_matrices(matrix1, matrix2, threshold=0.05):
:param matrix2: Matrix that will be compared; first column could be header
:param matrix2: Matrix that will be compared; first column could be header
:param threshold: Any difference greater than this percent threshold will
:param threshold: Any difference greater than this percent threshold will
be reported.
be reported.
:ret
ru
n: Matrix with the difference in comparison, number of improvements,
:ret
ur
n: Matrix with the difference in comparison, number of improvements,
number of regressions, total number of comparisons.
number of regressions, total number of comparisons.
"""
"""
improvements
=
0
improvements
=
0
...
...
avocado/utils/distro.py
浏览文件 @
38f4f2ed
...
@@ -53,7 +53,7 @@ class LinuxDistro(object):
...
@@ -53,7 +53,7 @@ class LinuxDistro(object):
:param release: the release or minor version of the distribution.
:param release: the release or minor version of the distribution.
Usually this is also a single number, that is often
Usually this is also a single number, that is often
omitted or starts with a 0 when the major version
omitted or starts with a 0 when the major version
is initially release. It's ofte
r
associated with a
is initially release. It's ofte
n
associated with a
shorter development cycle that contains incremental
shorter development cycle that contains incremental
a collection of improvements and fixes.
a collection of improvements and fixes.
:type release: str
:type release: str
...
@@ -107,7 +107,7 @@ class Probe(object):
...
@@ -107,7 +107,7 @@ class Probe(object):
#: by :attr:`CHECK_FILE_EXISTS` exist.
#: by :attr:`CHECK_FILE_EXISTS` exist.
CHECK_FILE_DISTRO_NAME
=
None
CHECK_FILE_DISTRO_NAME
=
None
#: A regular expresion that will be run on the file pointed to by
#: A regular expres
s
ion that will be run on the file pointed to by
#: :attr:`CHECK_FILE_EXISTS`
#: :attr:`CHECK_FILE_EXISTS`
CHECK_VERSION_REGEX
=
None
CHECK_VERSION_REGEX
=
None
...
@@ -265,7 +265,7 @@ class StdLibProbe(Probe):
...
@@ -265,7 +265,7 @@ class StdLibProbe(Probe):
"""
"""
Probe that uses the Python standard library builtin detection
Probe that uses the Python standard library builtin detection
This Probe has a lower score on purpo
r
se, serving as a fallback
This Probe has a lower score on purpose, serving as a fallback
if no explicit (and hopefully more accurate) probe exists.
if no explicit (and hopefully more accurate) probe exists.
"""
"""
...
...
avocado/utils/gdb.py
浏览文件 @
38f4f2ed
...
@@ -374,7 +374,7 @@ class GDB(object):
...
@@ -374,7 +374,7 @@ class GDB(object):
"""
"""
Read raw responses from GDB
Read raw responses from GDB
:param timeout: the amount of time to way between read attemps
:param timeout: the amount of time to way between read attemp
t
s
:type timeout: float
:type timeout: float
:param max_tries: the maximum number of cycles to try to read until
:param max_tries: the maximum number of cycles to try to read until
a response is obtained
a response is obtained
...
@@ -637,7 +637,7 @@ class GDBServer(object):
...
@@ -637,7 +637,7 @@ class GDBServer(object):
:param wait_until_running: wait until the gdbserver is running and
:param wait_until_running: wait until the gdbserver is running and
accepting connections. It may take a little
accepting connections. It may take a little
after the process is started and it is
after the process is started and it is
actually bound to the al
oc
cated port
actually bound to the al
lo
cated port
:type wait_until_running: bool
:type wait_until_running: bool
:param extra_args: optional extra arguments to be passed to gdbserver
:param extra_args: optional extra arguments to be passed to gdbserver
"""
"""
...
...
avocado/utils/iso9660.py
浏览文件 @
38f4f2ed
...
@@ -76,7 +76,7 @@ def has_isoread():
...
@@ -76,7 +76,7 @@ def has_isoread():
def
can_mount
():
def
can_mount
():
"""
"""
Test wether the current user can perform a loop mount
Test w
h
ether the current user can perform a loop mount
AFAIK, this means being root, having mount and iso9660 kernel support
AFAIK, this means being root, having mount and iso9660 kernel support
...
@@ -302,9 +302,9 @@ class Iso9660Mount(BaseIso9660):
...
@@ -302,9 +302,9 @@ class Iso9660Mount(BaseIso9660):
def
iso9660
(
path
):
def
iso9660
(
path
):
"""
"""
Checks the avaiable tools on a system and chooses class accordingly
Checks the avai
l
able tools on a system and chooses class accordingly
This is a conv
inience function, that will pick the first avaia
lable
This is a conv
enience function, that will pick the first avai
lable
iso9660 capable tool.
iso9660 capable tool.
:param path: path to an iso9660 image file
:param path: path to an iso9660 image file
...
...
avocado/utils/path.py
浏览文件 @
38f4f2ed
...
@@ -145,7 +145,7 @@ class PathInspector(object):
...
@@ -145,7 +145,7 @@ class PathInspector(object):
def
usable_rw_dir
(
directory
):
def
usable_rw_dir
(
directory
):
"""
"""
Verify wether we can use this dir (read/write).
Verify w
h
ether we can use this dir (read/write).
Checks for appropriate permissions, and creates missing dirs as needed.
Checks for appropriate permissions, and creates missing dirs as needed.
...
...
avocado/utils/process.py
浏览文件 @
38f4f2ed
...
@@ -195,7 +195,7 @@ def binary_from_shell_cmd(cmd):
...
@@ -195,7 +195,7 @@ def binary_from_shell_cmd(cmd):
Tries to find the first binary path from a simple shell-like command.
Tries to find the first binary path from a simple shell-like command.
:note: It's a naive implementation, but for commands like:
:note: It's a naive implementation, but for commands like:
`VAR=VAL binary -args || true` gives the right resu
tl
(binary)
`VAR=VAL binary -args || true` gives the right resu
lt
(binary)
:param cmd: simple shell-like binary
:param cmd: simple shell-like binary
:return: first found binary from the cmd
:return: first found binary from the cmd
"""
"""
...
...
avocado/utils/service.py
浏览文件 @
38f4f2ed
...
@@ -98,7 +98,7 @@ def sys_v_init_result_parser(command):
...
@@ -98,7 +98,7 @@ def sys_v_init_result_parser(command):
Parse results from sys_v style commands.
Parse results from sys_v style commands.
command status: return true if service is running.
command status: return true if service is running.
command is_enabled: return true if service is ena
l
bled.
command is_enabled: return true if service is enabled.
command list: return a dict from service name to status.
command list: return a dict from service name to status.
command others: return true if operate success.
command others: return true if operate success.
...
@@ -188,7 +188,7 @@ def systemd_result_parser(command):
...
@@ -188,7 +188,7 @@ def systemd_result_parser(command):
Parse results from systemd style commands.
Parse results from systemd style commands.
command status: return true if service is running.
command status: return true if service is running.
command is_enabled: return true if service is ena
l
bled.
command is_enabled: return true if service is enabled.
command list: return a dict from service name to status.
command list: return a dict from service name to status.
command others: return true if operate success.
command others: return true if operate success.
...
...
avocado/utils/software_manager.py
浏览文件 @
38f4f2ed
...
@@ -858,7 +858,7 @@ def install_distro_packages(distro_pkg_map, interactive=False):
...
@@ -858,7 +858,7 @@ def install_distro_packages(distro_pkg_map, interactive=False):
If these conditions match, the packages will be installed using the
If these conditions match, the packages will be installed using the
software manager interface, thus the native packaging system if the
software manager interface, thus the native packaging system if the
curren
lt
y running distro.
curren
tl
y running distro.
:type distro_pkg_map: dict
:type distro_pkg_map: dict
:param distro_pkg_map: mapping of distro name, as returned by
:param distro_pkg_map: mapping of distro name, as returned by
...
...
docs/source/RunningTestsRemotely.rst
浏览文件 @
38f4f2ed
...
@@ -151,9 +151,10 @@ Environment Variables
...
@@ -151,9 +151,10 @@ Environment Variables
=====================
=====================
Running remote instances os Avocado, for example using `remote` or `vm`
Running remote instances os Avocado, for example using `remote` or `vm`
plugins, the remote environment has a diferent set of environment variables. If
plugins, the remote environment has a different set of environment variables.
you want to make available remotely variables that are available in the local
If you want to make available remotely variables that are available in the
environment, you can use the `run` option `--env-keep`. See the example below::
local environment, you can use the `run` option `--env-keep`. See the example
below::
$ export MYVAR1=foobar
$ export MYVAR1=foobar
$ env MYVAR2=foobar2 avocado run passtest.py --env-keep MYVAR1,MYVAR2 --remote-hostname 192.168.122.30 --remote-username fedora
$ env MYVAR2=foobar2 avocado run passtest.py --env-keep MYVAR1,MYVAR2 --remote-hostname 192.168.122.30 --remote-username fedora
...
...
selftests/functional/test_basic.py
浏览文件 @
38f4f2ed
...
@@ -592,7 +592,7 @@ class RunnerSimpleTest(unittest.TestCase):
...
@@ -592,7 +592,7 @@ class RunnerSimpleTest(unittest.TestCase):
def
test_runner_onehundred_fail_timing
(
self
):
def
test_runner_onehundred_fail_timing
(
self
):
"""
"""
We can be pretty sure that a failtest should return immediat
t
ely. Let's
We can be pretty sure that a failtest should return immediately. Let's
run 100 of them and assure they not take more than 30 seconds to run.
run 100 of them and assure they not take more than 30 seconds to run.
Notice: on a current machine this takes about 0.12s, so 30 seconds is
Notice: on a current machine this takes about 0.12s, so 30 seconds is
...
...
selftests/unit/test_tree.py
浏览文件 @
38f4f2ed
...
@@ -186,7 +186,7 @@ class TestTree(unittest.TestCase):
...
@@ -186,7 +186,7 @@ class TestTree(unittest.TestCase):
self
.
assertEqual
(
tree2
.
children
[
0
].
children
[
1
].
multiplex
,
True
)
self
.
assertEqual
(
tree2
.
children
[
0
].
children
[
1
].
multiplex
,
True
)
# multiplex /virt/env
# multiplex /virt/env
self
.
assertEqual
(
tree2
.
children
[
0
].
children
[
2
].
multiplex
,
True
)
self
.
assertEqual
(
tree2
.
children
[
0
].
children
[
2
].
multiplex
,
True
)
# multiplex /virt/absolutly
# multiplex /virt/absolut
e
ly
self
.
assertEqual
(
tree2
.
children
[
0
].
children
[
3
].
multiplex
,
None
)
self
.
assertEqual
(
tree2
.
children
[
0
].
children
[
3
].
multiplex
,
None
)
# multiplex /virt/distro/fedora
# multiplex /virt/distro/fedora
self
.
assertEqual
(
tree2
.
children
[
0
].
children
[
1
].
children
[
0
].
multiplex
,
self
.
assertEqual
(
tree2
.
children
[
0
].
children
[
1
].
children
[
0
].
multiplex
,
...
...
selftests/unit/test_utils_asset.py
浏览文件 @
38f4f2ed
...
@@ -61,7 +61,7 @@ class TestAsset(unittest.TestCase):
...
@@ -61,7 +61,7 @@ class TestAsset(unittest.TestCase):
with
open
(
foo_tarball
,
'r'
)
as
f
:
with
open
(
foo_tarball
,
'r'
)
as
f
:
content1
=
f
.
read
()
content1
=
f
.
read
()
# Create the file in a dif
erent location with a di
ferent content
# Create the file in a dif
ferent location with a dif
ferent content
new_assetdir
=
tempfile
.
mkdtemp
(
dir
=
self
.
basedir
)
new_assetdir
=
tempfile
.
mkdtemp
(
dir
=
self
.
basedir
)
new_localpath
=
os
.
path
.
join
(
new_assetdir
,
self
.
assetname
)
new_localpath
=
os
.
path
.
join
(
new_assetdir
,
self
.
assetname
)
new_url
=
'file://%s'
%
new_localpath
new_url
=
'file://%s'
%
new_localpath
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录