Massive spelling correction

Signed-off-by: NAmador Pahim <apahim@redhat.com>
上级 8b84df5c
...@@ -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 someonte 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)
......
...@@ -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 duplicite @DEFAULT entries while "@DEFAULT" in loaders: # Remove duplicate @DEFAULT entries
loaders.remove("@DEFAULT") loaders.remove("@DEFAULT")
loaders = [_.split(':', 1) for _ in loaders] loaders = [_.split(':', 1) for _ in loaders]
......
...@@ -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 filteres 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 duplicite entries due to inherited values. which generates lots of duplicate 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 symmetrical
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:
......
...@@ -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 occurred 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 comming 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`
""" """
......
...@@ -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 specific command
''' '''
connection_group = self.add_argument_group( connection_group = self.add_argument_group(
'CONNECTION', 'CONNECTION',
......
...@@ -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: whether 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 available to the current user
""" """
return self.request('') return self.request('')
......
...@@ -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 whether 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, whether an aliased import was used
or not. or not.
For code such as: For code such as:
......
...@@ -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 whether
a test or a job in avocado PASSed or FAILed. a test or a job in avocado PASSed or FAILed.
""" """
......
...@@ -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 upcomming 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 "
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
# #
""" """
Tree data strucure with nodes. Tree data structure 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:
......
...@@ -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 ofter associated with a is initially release. It's often 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
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
# Author: Amador Pahim <apahim@redhat.com> # Author: Amador Pahim <apahim@redhat.com>
""" """
Asset fetcher from multiple locationss Asset fetcher from multiple locations
""" """
import errno import errno
......
...@@ -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 without any special codes
:rtype: string :rtype: string
""" """
if "\x1b" not in output: if "\x1b" not in output:
......
...@@ -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 collisions in code.
""" """
try: try:
......
...@@ -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.
:retrun: Matrix with the difference in comparison, number of improvements, :return: 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
......
...@@ -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 ofter associated with a is initially release. It's often 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 expression 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 purporse, 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.
""" """
......
...@@ -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 attempts
: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 aloccated port actually bound to the allocated 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
""" """
......
...@@ -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 whether 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 available tools on a system and chooses class accordingly
This is a convinience function, that will pick the first avaialable This is a convenience function, that will pick the first available
iso9660 capable tool. iso9660 capable tool.
:param path: path to an iso9660 image file :param path: path to an iso9660 image file
......
...@@ -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 whether 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.
......
...@@ -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 resutl (binary) `VAR=VAL binary -args || true` gives the right result (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
""" """
......
...@@ -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 enalbled. 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 enalbled. 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.
......
...@@ -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
currenlty running distro. currently 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
......
...@@ -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
......
...@@ -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 immediattely. 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
......
...@@ -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/absolutely
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,
......
...@@ -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 diferent location with a diferent content # Create the file in a different location with a different 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.
先完成此消息的编辑!
想要评论请 注册