diff --git a/avocado/core/tree.py b/avocado/core/tree.py index 1c02638b7b2b464436722418d82d04721e3673e1..b9897f15d2c9d40c38572db7db3d264fb31d714f 100644 --- a/avocado/core/tree.py +++ b/avocado/core/tree.py @@ -214,8 +214,8 @@ class TreeNode(object): if self.parent else {}) for key, value in self.value.iteritems(): if isinstance(value, list): - if (key in self._environment - and isinstance(self._environment[key], list)): + if (key in self._environment and + isinstance(self._environment[key], list)): self._environment[key] = self._environment[key] + value else: self._environment[key] = value @@ -308,8 +308,8 @@ class TreeNode(object): if not compact: result.pop() (low, high, end) = (mids[0], mids[-1], len(result)) - prefixes = ([pad] * (low + 1) + [_pad + '|'] * (high - low - 1) - + [pad] * (end - high)) + prefixes = ([pad] * (low + 1) + [_pad + '|'] * (high - low - 1) + + [pad] * (end - high)) mid = (low + high) / 2 prefixes[mid] = char1 + '-' * (length - 2) + prefixes[mid][-1] result = [p + l for (p, l) in zip(prefixes, result)] diff --git a/avocado/linux/software_manager.py b/avocado/linux/software_manager.py index dae6b9c4eecf7f25be25b6953fc5d8ac66cf5621..a2c8145a19b3986a0c6afd89188ce9479a2fc0f6 100644 --- a/avocado/linux/software_manager.py +++ b/avocado/linux/software_manager.py @@ -298,8 +298,8 @@ class DpkgBackend(BaseBackend): n_cmd = (self.lowlevel_base_cmd + ' -f ' + name + ' Package 2>/dev/null') name = process.system_output(n_cmd) - i_cmd = (self.lowlevel_base_cmd + "--show -f='${Status}' " - + name + ' 2>/dev/null') + i_cmd = (self.lowlevel_base_cmd + "--show -f='${Status}' " + + name + ' 2>/dev/null') # Checking if package is installed package_status = process.system_output(i_cmd, ignore_status=True) dpkg_not_installed = (package_status != self.INSTALLED_OUTPUT) diff --git a/avocado/plugins/remote.py b/avocado/plugins/remote.py index 282db32d76af983b29bc5c5a78aa468d43ad479b..c940dc97d1073464d56273c65c6f60de205cd3b0 100644 --- a/avocado/plugins/remote.py +++ b/avocado/plugins/remote.py @@ -213,8 +213,8 @@ class RunRemote(plugin.Plugin): :return: True when enable_arg enabled and all required args are set :raise sys.exit: When missing required argument. """ - if (not hasattr(app_args, enable_arg) - or not getattr(app_args, enable_arg)): + if (not hasattr(app_args, enable_arg) or + not getattr(app_args, enable_arg)): return False missing = [] for arg in required_args: diff --git a/avocado/plugins/vm.py b/avocado/plugins/vm.py index ee7f7265bd51c00afc3e1f11e53527cd136ba4b4..a34c0c231dc7badff093b01742bf08665a7cc6df 100644 --- a/avocado/plugins/vm.py +++ b/avocado/plugins/vm.py @@ -136,8 +136,8 @@ class RunVM(plugin.Plugin): :return: True when enable_arg enabled and all required args are set :raise sys.exit: When missing required argument. """ - if (not hasattr(app_args, enable_arg) - or not getattr(app_args, enable_arg)): + if (not hasattr(app_args, enable_arg) or + not getattr(app_args, enable_arg)): return False missing = [] for arg in required_args: diff --git a/avocado/utils/astring.py b/avocado/utils/astring.py index b16e9d44489bc9def5a9079d26a0dfdd2323a7a5..4a4398f1dfdcc41e597c14affb3fab49205361c1 100644 --- a/avocado/utils/astring.py +++ b/avocado/utils/astring.py @@ -93,8 +93,8 @@ def strip_console_codes(output, custom_codes=None): while index < len(output): tmp_index = 0 tmp_word = "" - while (len(re.findall("\x1b", tmp_word)) < 2 - and index + tmp_index < len(output)): + while (len(re.findall("\x1b", tmp_word)) < 2 and + index + tmp_index < len(output)): tmp_word += output[index + tmp_index] tmp_index += 1 diff --git a/avocado/utils/debug.py b/avocado/utils/debug.py index d5afd1ca623a8dc17cdc161142025ed863514a8a..36b64442d49b05bfe97664e5f58dc96d04d515e8 100644 --- a/avocado/utils/debug.py +++ b/avocado/utils/debug.py @@ -38,8 +38,8 @@ def measure_duration(func): return func(*args, **kwargs) finally: duration = time.time() - start - __MEASURE_DURATION[func] = (__MEASURE_DURATION.get(func, 0) - + duration) + __MEASURE_DURATION[func] = (__MEASURE_DURATION.get(func, 0) + + duration) LOGGER.debug("PERF: %s: (%ss, %ss)", func, duration, __MEASURE_DURATION[func]) return wrapper diff --git a/selftests/all/functional/avocado/multiplex_tests.py b/selftests/all/functional/avocado/multiplex_tests.py index 18988b2944eafc8dfaf3831dbb855b30e8df04a5..c0e4cf8dfd46c84d58f7898841865087ea256b05 100644 --- a/selftests/all/functional/avocado/multiplex_tests.py +++ b/selftests/all/functional/avocado/multiplex_tests.py @@ -111,8 +111,8 @@ class MultiplexTests(unittest.TestCase): expected_rc = 0 output = self.run_and_check(cmd_line, expected_rc) for msg in ('A', 'ASDFASDF', 'This is very long\nmultiline\ntext.'): - msg = ('[stdout] Custom variable: ' - + '\n[stdout] '.join(msg.splitlines())) + msg = ('[stdout] Custom variable: ' + + '\n[stdout] '.join(msg.splitlines())) self.assertIn(msg, output, "Multiplexed variable should produce:" "\n %s\nwhich is not present in the output:\n %s" % ("\n ".join(msg.splitlines()),