Yet another spellcheck.

Signed-off-by: NAmador Pahim <apahim@redhat.com>
上级 c0ebd3f1
......@@ -199,11 +199,11 @@ class AvocadoParams(object):
converts user-friendly asterisk path to python regexp and compiles it:
path = "" => ^$
path = "/" => /
path = "/asdf/fdsa" => /asdf/fdsa
path = "asdf/fdsa" => $MUX_ENTRY/?.*/asdf/fdsa
path = "/*/asdf" => /[^/]*/asdf
path = "asdf/*" => $MUX_ENTRY/?.*/asdf/.*
path = "/asdf/*" => /asdf/.*
path = "/foo/bar" => /foo/bar
path = "foo/bar" => $MUX_ENTRY/?.*/foo/bar
path = "/*/foo" => /[^/]*/foo
path = "foo/*" => $MUX_ENTRY/?.*/foo/.*
path = "/foo/*" => /foo/.*
"""
if not path:
return re.compile('^$')
......
# This rogram is free software; you can redistribute it and/or modify
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
......
......@@ -90,9 +90,9 @@ class TestName(object):
fsname = astring.string_to_safe_path(name)
if len(name) == len(fsname): # everything fits in
return fsname
# 001-mytest;aaa
# 001-mytest;a
# 001-myte;aaa
# 001-mytest;foo
# 001-mytest;f
# 001-myte;foo
idx_fit_variant = len(fsname) - len(self.str_variant)
if idx_fit_variant > len(self.str_uid): # full uid+variant
return (fsname[:idx_fit_variant] +
......
......@@ -287,7 +287,7 @@ class TreeNode(object):
node = None
def iter_leaves(self):
""" Iterate throuh leaf nodes """
""" Iterate through leaf nodes """
for node in self.iter_children_preorder():
if node.is_leaf:
yield node
......
......@@ -200,7 +200,7 @@ def tabular_output(matrix, header=None):
def string_safe_encode(string):
"""
People tend to mix unicode strems with encoded strings. This function
People tend to mix unicode streams with encoded strings. This function
tries to replace any input with a valid utf-8 encoded ascii stream.
"""
if not isinstance(string, basestring):
......
......@@ -220,7 +220,7 @@ def get_buddy_info(chunk_sizes, nodes="all", zones="all"):
2^chunk_size * page_size
The chunk_sizes can be string make up by all orders that you want to check
splited with blank or a mathematical expression with ``>``, ``<`` or ``=``.
split with blank or a mathematical expression with ``>``, ``<`` or ``=``.
For example:
* The input of chunk_size could be: ``0 2 4``, and the return will be
......
......@@ -136,7 +136,7 @@ def make_script(path, content, mode=DEFAULT_MODE):
Creates a new script stored in the file system.
:param path: the script file name.
:param contet: the script content.
:param content: the script content.
:param mode: set file mode, default to 0775.
:return: the script path.
"""
......@@ -150,7 +150,7 @@ def make_temp_script(name, content, prefix='avocado_script', mode=DEFAULT_MODE):
Creates a new temporary script stored in the file system.
:param path: the script file name.
:param contet: the script content.
:param content: the script content.
:param prefix: the directory prefix Default to 'avocado_script'.
:param mode: set file mode, default to 0775.
:return: the script path.
......
......@@ -117,7 +117,7 @@ class TestTree(unittest.TestCase):
leaves = ['intel', 'amd', 'arm', 'scsi', 'virtio', 'fedora', 'mint',
'prod']
self.assertEqual(leaves, self.tree.get_leaves())
# asci contain all leaves and doesn't raise any exceptions
# ascii contain all leaves and doesn't raise any exceptions
ascii = tree.tree_view(self.tree, 0, False)
for leaf in leaves:
self.assertIn(leaf, ascii, "Leaf %s not in asci:\n%s"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册