From 38f4f2ed1f79d126542bb394a773520d47817817 Mon Sep 17 00:00:00 2001 From: Amador Pahim Date: Fri, 8 Jul 2016 10:39:18 +0200 Subject: [PATCH] Massive spelling correction Signed-off-by: Amador Pahim --- avocado/core/app.py | 2 +- avocado/core/loader.py | 2 +- avocado/core/multiplexer.py | 6 +++--- avocado/core/output.py | 4 ++-- avocado/core/restclient/cli/parser.py | 2 +- avocado/core/restclient/connection.py | 4 ++-- avocado/core/safeloader.py | 4 ++-- avocado/core/status.py | 2 +- avocado/core/test.py | 2 +- avocado/core/tree.py | 2 +- avocado/plugins/distro.py | 2 +- avocado/utils/asset.py | 2 +- avocado/utils/astring.py | 2 +- avocado/utils/aurl.py | 2 +- avocado/utils/data_structures.py | 2 +- avocado/utils/distro.py | 6 +++--- avocado/utils/gdb.py | 4 ++-- avocado/utils/iso9660.py | 6 +++--- avocado/utils/path.py | 2 +- avocado/utils/process.py | 2 +- avocado/utils/service.py | 4 ++-- avocado/utils/software_manager.py | 2 +- docs/source/RunningTestsRemotely.rst | 7 ++++--- selftests/functional/test_basic.py | 2 +- selftests/unit/test_tree.py | 2 +- selftests/unit/test_utils_asset.py | 2 +- 26 files changed, 40 insertions(+), 39 deletions(-) diff --git a/avocado/core/app.py b/avocado/core/app.py index ab1f058b..4ea4066e 100644 --- a/avocado/core/app.py +++ b/avocado/core/app.py @@ -56,7 +56,7 @@ class AvocadoApp(object): if self.cli_dispatcher.extensions: self.cli_dispatcher.map_method('run', self.parser.args) 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. setattr(self.parser.args, 'paginator', 'off') output.reconfigure(self.parser.args) diff --git a/avocado/core/loader.py b/avocado/core/loader.py index ac23c5d6..3aa50984 100644 --- a/avocado/core/loader.py +++ b/avocado/core/loader.py @@ -135,7 +135,7 @@ class TestLoaderProxy(object): loaders = (loaders[:idx] + [plugin for plugin in supported_loaders if plugin not in loaders] + loaders[idx + 1:]) - while "@DEFAULT" in loaders: # Remove duplicite @DEFAULT entries + while "@DEFAULT" in loaders: # Remove duplicate @DEFAULT entries loaders.remove("@DEFAULT") loaders = [_.split(':', 1) for _ in loaders] diff --git a/avocado/core/multiplexer.py b/avocado/core/multiplexer.py index f2b1a394..43bb5994 100644 --- a/avocado/core/multiplexer.py +++ b/avocado/core/multiplexer.py @@ -75,7 +75,7 @@ class MuxTree(object): pools.append(pool) pools = itertools.product(*pools) while True: - # TODO: Implement 2nd level filteres here + # TODO: Implement 2nd level filters here # TODO: This part takes most of the time, optimize it yield list(itertools.chain(*pools.next())) @@ -372,7 +372,7 @@ class AvocadoParam(object): def iteritems(self): """ 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 key, value in leaf.environment.iteritems(): @@ -405,7 +405,7 @@ class Mux(object): """ :return: overall number of tests * multiplex variants """ - # Currently number of tests is symetrical + # Currently number of tests is symmetrical if self.variants: no_variants = sum(1 for _ in self.variants) if no_variants > 1: diff --git a/avocado/core/output.py b/avocado/core/output.py index 752929f3..e39f7d0b 100644 --- a/avocado/core/output.py +++ b/avocado/core/output.py @@ -274,7 +274,7 @@ class StdOutput(object): 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. """ for stream, msg in self.records: @@ -677,7 +677,7 @@ def log_plugin_failures(failures): """ 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` attribute `load_failures` """ diff --git a/avocado/core/restclient/cli/parser.py b/avocado/core/restclient/cli/parser.py index 181aa850..ce361f85 100644 --- a/avocado/core/restclient/cli/parser.py +++ b/avocado/core/restclient/cli/parser.py @@ -44,7 +44,7 @@ class Parser(argparse.ArgumentParser): 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', diff --git a/avocado/core/restclient/connection.py b/avocado/core/restclient/connection.py index 6df75be7..5f0176e3 100644 --- a/avocado/core/restclient/connection.py +++ b/avocado/core/restclient/connection.py @@ -130,7 +130,7 @@ class Connection(object): :type path: str :param method: the method you want to call on the remote server, 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 depend on the method chosen. If set to `False`, no check will be performed. If an integer is given @@ -194,7 +194,7 @@ class Connection(object): 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('') diff --git a/avocado/core/safeloader.py b/avocado/core/safeloader.py index b1da2dd9..b1abb90b 100644 --- a/avocado/core/safeloader.py +++ b/avocado/core/safeloader.py @@ -24,10 +24,10 @@ from ..utils import data_structures 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 - 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. For code such as: diff --git a/avocado/core/status.py b/avocado/core/status.py index adbd2145..266b49c5 100644 --- a/avocado/core/status.py +++ b/avocado/core/status.py @@ -12,7 +12,7 @@ """ 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. """ diff --git a/avocado/core/test.py b/avocado/core/test.py index d17e2459..95df112f 100644 --- a/avocado/core/test.py +++ b/avocado/core/test.py @@ -189,7 +189,7 @@ class Test(unittest.TestCase): self.log.warn = self.log.warning = record_and_warn if _incorrect_name is not None: 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) if tag is not None: # TODO: Remove in release 0.37 self.log.warn("The 'tag' argument is not supported and will be " diff --git a/avocado/core/tree.py b/avocado/core/tree.py index c39ea071..649aa438 100644 --- a/avocado/core/tree.py +++ b/avocado/core/tree.py @@ -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 structure of the ETE 2 project: diff --git a/avocado/plugins/distro.py b/avocado/plugins/distro.py index 153ed24d..f72e2298 100644 --- a/avocado/plugins/distro.py +++ b/avocado/plugins/distro.py @@ -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. Usually this is also a single number, that is often 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 a collection of improvements and fixes. :type release: str diff --git a/avocado/utils/asset.py b/avocado/utils/asset.py index 8cbd2680..3be1d6b4 100644 --- a/avocado/utils/asset.py +++ b/avocado/utils/asset.py @@ -13,7 +13,7 @@ # Author: Amador Pahim """ -Asset fetcher from multiple locationss +Asset fetcher from multiple locations """ import errno diff --git a/avocado/utils/astring.py b/avocado/utils/astring.py index eb18ad52..916e8bea 100644 --- a/avocado/utils/astring.py +++ b/avocado/utils/astring.py @@ -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 covered in the default codes :type output: string - :return: the string wihout any special codes + :return: the string without any special codes :rtype: string """ if "\x1b" not in output: diff --git a/avocado/utils/aurl.py b/avocado/utils/aurl.py index 88268d83..b0862d84 100644 --- a/avocado/utils/aurl.py +++ b/avocado/utils/aurl.py @@ -15,7 +15,7 @@ """ 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: diff --git a/avocado/utils/data_structures.py b/avocado/utils/data_structures.py index 872e51c2..ae09a4b3 100644 --- a/avocado/utils/data_structures.py +++ b/avocado/utils/data_structures.py @@ -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 threshold: Any difference greater than this percent threshold will 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. """ improvements = 0 diff --git a/avocado/utils/distro.py b/avocado/utils/distro.py index 70d3544b..1ca8ea09 100644 --- a/avocado/utils/distro.py +++ b/avocado/utils/distro.py @@ -53,7 +53,7 @@ class LinuxDistro(object): :param release: the release or minor version of the distribution. Usually this is also a single number, that is often 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 a collection of improvements and fixes. :type release: str @@ -107,7 +107,7 @@ class Probe(object): #: by :attr:`CHECK_FILE_EXISTS` exist. 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` CHECK_VERSION_REGEX = None @@ -265,7 +265,7 @@ class StdLibProbe(Probe): """ 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. """ diff --git a/avocado/utils/gdb.py b/avocado/utils/gdb.py index a8f6e613..3ef7fae6 100644 --- a/avocado/utils/gdb.py +++ b/avocado/utils/gdb.py @@ -374,7 +374,7 @@ class GDB(object): """ 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 :param max_tries: the maximum number of cycles to try to read until a response is obtained @@ -637,7 +637,7 @@ class GDBServer(object): :param wait_until_running: wait until the gdbserver is running and accepting connections. It may take a little 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 :param extra_args: optional extra arguments to be passed to gdbserver """ diff --git a/avocado/utils/iso9660.py b/avocado/utils/iso9660.py index 31ace5a1..6c183684 100644 --- a/avocado/utils/iso9660.py +++ b/avocado/utils/iso9660.py @@ -76,7 +76,7 @@ def has_isoread(): 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 @@ -302,9 +302,9 @@ class Iso9660Mount(BaseIso9660): 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. :param path: path to an iso9660 image file diff --git a/avocado/utils/path.py b/avocado/utils/path.py index 38f76b8a..28559ccf 100644 --- a/avocado/utils/path.py +++ b/avocado/utils/path.py @@ -145,7 +145,7 @@ class PathInspector(object): 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. diff --git a/avocado/utils/process.py b/avocado/utils/process.py index c77727cc..1d1eada3 100644 --- a/avocado/utils/process.py +++ b/avocado/utils/process.py @@ -195,7 +195,7 @@ def binary_from_shell_cmd(cmd): Tries to find the first binary path from a simple shell-like command. :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 :return: first found binary from the cmd """ diff --git a/avocado/utils/service.py b/avocado/utils/service.py index 75eec53d..42ac3122 100644 --- a/avocado/utils/service.py +++ b/avocado/utils/service.py @@ -98,7 +98,7 @@ def sys_v_init_result_parser(command): Parse results from sys_v style commands. 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 others: return true if operate success. @@ -188,7 +188,7 @@ def systemd_result_parser(command): Parse results from systemd style commands. 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 others: return true if operate success. diff --git a/avocado/utils/software_manager.py b/avocado/utils/software_manager.py index 5068db50..5671d0f5 100644 --- a/avocado/utils/software_manager.py +++ b/avocado/utils/software_manager.py @@ -858,7 +858,7 @@ def install_distro_packages(distro_pkg_map, interactive=False): If these conditions match, the packages will be installed using the software manager interface, thus the native packaging system if the - currenlty running distro. + currently running distro. :type distro_pkg_map: dict :param distro_pkg_map: mapping of distro name, as returned by diff --git a/docs/source/RunningTestsRemotely.rst b/docs/source/RunningTestsRemotely.rst index 243accc1..d535c8ab 100644 --- a/docs/source/RunningTestsRemotely.rst +++ b/docs/source/RunningTestsRemotely.rst @@ -151,9 +151,10 @@ Environment Variables ===================== Running remote instances os Avocado, for example using `remote` or `vm` -plugins, the remote environment has a diferent set of environment variables. If -you want to make available remotely variables that are available in the local -environment, you can use the `run` option `--env-keep`. See the example below:: +plugins, the remote environment has a different set of environment variables. +If you want to make available remotely variables that are available in the +local environment, you can use the `run` option `--env-keep`. See the example +below:: $ export MYVAR1=foobar $ env MYVAR2=foobar2 avocado run passtest.py --env-keep MYVAR1,MYVAR2 --remote-hostname 192.168.122.30 --remote-username fedora diff --git a/selftests/functional/test_basic.py b/selftests/functional/test_basic.py index 875e163f..04a6697f 100644 --- a/selftests/functional/test_basic.py +++ b/selftests/functional/test_basic.py @@ -592,7 +592,7 @@ class RunnerSimpleTest(unittest.TestCase): 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. Notice: on a current machine this takes about 0.12s, so 30 seconds is diff --git a/selftests/unit/test_tree.py b/selftests/unit/test_tree.py index ca783c84..343265c7 100644 --- a/selftests/unit/test_tree.py +++ b/selftests/unit/test_tree.py @@ -186,7 +186,7 @@ class TestTree(unittest.TestCase): self.assertEqual(tree2.children[0].children[1].multiplex, True) # multiplex /virt/env self.assertEqual(tree2.children[0].children[2].multiplex, True) - # multiplex /virt/absolutly + # multiplex /virt/absolutely self.assertEqual(tree2.children[0].children[3].multiplex, None) # multiplex /virt/distro/fedora self.assertEqual(tree2.children[0].children[1].children[0].multiplex, diff --git a/selftests/unit/test_utils_asset.py b/selftests/unit/test_utils_asset.py index 108e1594..0e326b67 100644 --- a/selftests/unit/test_utils_asset.py +++ b/selftests/unit/test_utils_asset.py @@ -61,7 +61,7 @@ class TestAsset(unittest.TestCase): with open(foo_tarball, 'r') as f: 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_localpath = os.path.join(new_assetdir, self.assetname) new_url = 'file://%s' % new_localpath -- GitLab