diff --git a/avocado/core/tree.py b/avocado/core/tree.py index 4018f2ff5d3e164d78d7a910e04b3a8b53e6529b..7e4ba97ea0ee982b33182e68f363626ab681f6df 100644 --- a/avocado/core/tree.py +++ b/avocado/core/tree.py @@ -97,6 +97,7 @@ class TreeNodeEnvOnly(object): """ Minimal TreeNode-like class providing interface for AvocadoParams """ + def __init__(self, path, environment=None): """ :param path: Path of this node (must not end with '/') diff --git a/avocado/plugins/variants.py b/avocado/plugins/variants.py index 60f4aba31c99da05fecac12e09dddb7b04b9c3b3..7b7ca7587b136989d482eccdad9cbe516175ff7a 100644 --- a/avocado/plugins/variants.py +++ b/avocado/plugins/variants.py @@ -51,7 +51,7 @@ class Variants(CLICmd): parser = super(Variants, self).configure(parser) verbosity_levels = ("(positive integer - 0, 1, ... - or %s)" % ", ".join(sorted(_VERBOSITY_LEVELS, - key=lambda _: _VERBOSITY_LEVELS[_]))) + key=lambda _: _VERBOSITY_LEVELS[_]))) parser.add_argument("--summary", type=map_verbosity_level, help="Verbosity of the variants summary. " + verbosity_levels) diff --git a/avocado/utils/asset.py b/avocado/utils/asset.py index 9da8b6be962063ba65f329d9e5e2f19a16fdb65f..d9c40cdbb9d0c579ce9032b545ea98e5e4e9ed6f 100644 --- a/avocado/utils/asset.py +++ b/avocado/utils/asset.py @@ -95,7 +95,7 @@ class Asset(object): # - Be valid (not expired). # - Be verified (hash check). if (os.path.isfile(self.asset_file) and - not self._is_expired(self.asset_file, self.expire)): + not self._is_expired(self.asset_file, self.expire)): try: with FileLock(self.asset_file, 1): if self._verify(): diff --git a/avocado/utils/kernel.py b/avocado/utils/kernel.py index 427b55d027599e21131eafb0729efc67e852eb11..e21583b82d2b5614f23cfde7ec4748b9a8d07828 100644 --- a/avocado/utils/kernel.py +++ b/avocado/utils/kernel.py @@ -17,7 +17,7 @@ import os import shutil import logging import tempfile -from distutils.version import LooseVersion +from distutils.version import LooseVersion # pylint: disable=E0611 from . import asset, archive, build diff --git a/selftests/functional/test_basic.py b/selftests/functional/test_basic.py index 9d3db59e8a038c9bcad7943a0b176277447317f9..0963ec960d47e70061535d8e876425c64d2eac0a 100644 --- a/selftests/functional/test_basic.py +++ b/selftests/functional/test_basic.py @@ -1140,8 +1140,9 @@ class PluginsXunitTest(AbsPluginsTest, unittest.TestCase): def setUp(self): self.tmpdir = tempfile.mkdtemp(prefix='avocado_' + __name__) - self.junit = os.path.abspath(os.path.join(os.path.dirname(__file__), - os.path.pardir, ".data", 'junit-4.xsd')) + junit_xsd = os.path.join(os.path.dirname(__file__), + os.path.pardir, ".data", 'junit-4.xsd') + self.junit = os.path.abspath(junit_xsd) super(PluginsXunitTest, self).setUp() def run_and_check(self, testname, e_rc, e_ntests, e_nerrors, diff --git a/selftests/unit/test_data_structures.py b/selftests/unit/test_data_structures.py index ac5894c67742fcaf9cfa605e80b75588c2266375..4968bab62a5aff389a6a3294c83fd124b3cbd66d 100644 --- a/selftests/unit/test_data_structures.py +++ b/selftests/unit/test_data_structures.py @@ -34,8 +34,8 @@ class TestDataStructures(unittest.TestCase): matrix1 = [["header", 51.7, 60], [1, 0, 0]] matrix2 = [["header", 57.2, 54], [2, 51, 0]] self.assertEqual(data_structures.compare_matrices(matrix1, matrix2), - ([["header", '+10.6383', -10.0], ['+100', - 'error_51/0', '.']], 3, 1, 5)) + ([["header", '+10.6383', -10.0], + ['+100', 'error_51/0', '.']], 3, 1, 5)) def test_lazy_property(self): """ diff --git a/selftests/unit/test_vm.py b/selftests/unit/test_vm.py index afe2ed5ea9b2643537feeff3384d220fbbeac92f..35c2d3de2eae452b5739d22f5f57546defbb28f2 100644 --- a/selftests/unit/test_vm.py +++ b/selftests/unit/test_vm.py @@ -20,6 +20,7 @@ class _FakeVM(avocado_runner_vm.VM): Fake VM-inherited object (it's better to inherit it, than to flexmock the isinstance) """ + def __init__(self): # pylint: disable=W0231 # don't call avocado_runner_vm.VM.__init__ self.snapshot = True diff --git a/selftests/unit/test_xunit.py b/selftests/unit/test_xunit.py index bad896edb60d0f860b66b9b6e7090a7202e79e47..f8a67bc9da95bea0bdf2664816111e14ee97ce8f 100644 --- a/selftests/unit/test_xunit.py +++ b/selftests/unit/test_xunit.py @@ -47,8 +47,9 @@ class xUnitSucceedTest(unittest.TestCase): self.test1 = SimpleTest(job=self.job, base_logdir=self.tmpdir) self.test1._Test__status = 'PASS' self.test1.time_elapsed = 1.23 - self.junit = os.path.abspath(os.path.join(os.path.dirname(__file__), - os.path.pardir, ".data", 'junit-4.xsd')) + junit_xsd = os.path.join(os.path.dirname(__file__), + os.path.pardir, ".data", 'junit-4.xsd') + self.junit = os.path.abspath(junit_xsd) def tearDown(self): os.close(self.tmpfile[0])