diff --git a/avocado/core/app.py b/avocado/core/app.py index ab1f058b70d9fd65150d911484880e099c4ac427..4ea4066e0d5d19d0e8c076f002f04b0213d4b0a1 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 ac23c5d6e7b082067afcacdf1abec5b867efeda6..3aa50984118000f661d02b3c52420db0c9cf66c2 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 f2b1a394e39776dd893b943c90346ef45c70064e..43bb5994faf36d6785e6c3a00433ff0c741c857b 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 752929f3dc0d3a26a7d1f1a33c90bf36f998443a..e39f7d0bb4df58fe29b3757521e7c9da55eca497 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 181aa8509cdf71f27571057fe9116d17d2ab001f..ce361f85d4e68bdc5b72964c7c2f42ed4654b53e 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 6df75be7ad1a55a10157bbf1af16c66b5388d6ba..5f0176e3ec5e5859d60806f721b06298bea5a26b 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 b1da2dd9d17f02460d0271e58dc8a632a5317e9f..b1abb90b70c0a1de5560de443a7d11cd4a3abb2c 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 adbd2145cfc86256dc2f2e7c29409aa6676e95e0..266b49c5ca45e73e7ec88ed3d8015f6396618b4e 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 d17e2459b67d2b6f6ef6f188d299ccc56093b2da..95df112fdfcc062d9577236fce3ae5c53306e263 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 c39ea0710390fc1dbfaac3c15470a7e08d612308..649aa43858c89a5fd3272c6e4b0d9b82e973ea59 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 153ed24de268bee33c684f5063274b981bcb07b0..f72e229813cbd92a3e27fde3da1459583262238f 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 8cbd2680ff5fdde099ad325bc08867b08a82d2b1..3be1d6b49bd27a56fa6cd6a417f49b8c682ff5e0 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 eb18ad5276d6679708def91ca5d788db7361fe70..916e8bea037459969aaccd4cb5a5b4bdf866a627 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 88268d8397591ad0e696d444b71b9bedb65a38d4..b0862d84bc43d2825399822d88b4dc0f7e01a0a6 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 872e51c283a35a42b0f84e6e30b49627ffcba9ec..ae09a4b3f95f4e5f77d8b136083b3a02c70e287e 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 70d3544b0728f5a2c3eedcb40145041bb3b6a962..1ca8ea092f8856d82498ceae4ee0d9c5029d2433 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 a8f6e613a21a32a13a831381ab191fbc4365b0ed..3ef7fae6bd02301def3b25ecb9db03bf1fc36a04 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 31ace5a1296f576141495dadd16f1a96d09c23fe..6c183684c7b8660866e24318e762774ba5fe9c55 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 38f76b8a95ed2d06a038713066a28cd9d2e0a1aa..28559ccfc4f40de928e0b6f0ac8df8f837d7307e 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 c77727cc001b72f8994ac9d9cace0587bba9ca25..1d1eada3dddec3e7d878fa4f9397cba51dce9ba5 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 75eec53d67b80e7999dfd10d18097ae475046f96..42ac3122ca955875fb2d6a501e76c5d08f1ddc77 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 5068db50d057f276807e691f93a51c34b9d5a48f..5671d0f57bdf7b2eb29ef92228acb966c502c97a 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 243accc11ddc32acd952ecf8a7ae06061930408c..d535c8ab37ed12a78f49b73d5a74ac6d9ab9e448 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 875e163fc9a701c8917f369b9a11f18048a8b3fa..04a6697fdb26ba062fd0b37003a9ce9d8130b62f 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 ca783c842047413c5323ef0b7cec52fceb6c257b..343265c7dc1a46ba6e144dc633ab632e1695b941 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 108e159492999bb4f693b1ba3944fd5ff26ec1ee..0e326b6780e3740b56965e19cf2e1d6239b586be 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