In this particular case, the unittest overrides the mentioned functions with the purpose of mocking it, so it's OK it is there. Therefore, taking another step for a clean pylint quiet run, silence those errors by appending the appropriate comments.
Signed-off-by: Lucas Meneghel Rodrigues <[email protected]> --- client/job.py | 4 ++++ client/shared/base_job.py | 5 ++++- client/shared/base_job_unittest.py | 4 ++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/client/job.py b/client/job.py index 0508006..abd2bdb 100644 --- a/client/job.py +++ b/client/job.py @@ -125,6 +125,8 @@ class base_client_job(base_job.base_job): @classmethod + # The unittests will hide this method, well, for unittesting + # pylint: disable=E0202 def _find_base_directories(cls): """ Determine locations of autodir and clientdir (which are the same) @@ -139,6 +141,8 @@ class base_client_job(base_job.base_job): return re.findall("[^\s]*?['|\"].*?['|\"]|[^\s]+", args) + # The unittests will hide this method, well, for unittesting + # pylint: disable=E0202 def _find_resultdir(self, options): """ Determine the directory for storing results. On a client this is diff --git a/client/shared/base_job.py b/client/shared/base_job.py index bbaf357..aff1ca7 100644 --- a/client/shared/base_job.py +++ b/client/shared/base_job.py @@ -1006,6 +1006,8 @@ class base_job(object): self._tap = self._tap_init(False) @classmethod + # The unittests will hide this method, well, for unittesting + # pylint: disable=E0202 def _find_base_directories(cls): raise NotImplementedError() @@ -1063,7 +1065,8 @@ class base_job(object): else: self._conmuxdir = None - + # The unittests will hide this method, well, for unittesting + # pylint: disable=E0202 def _find_resultdir(self, *args, **dargs): raise NotImplementedError() diff --git a/client/shared/base_job_unittest.py b/client/shared/base_job_unittest.py index 164f4ee..210c069 100755 --- a/client/shared/base_job_unittest.py +++ b/client/shared/base_job_unittest.py @@ -1261,8 +1261,10 @@ class test_job_tags(unittest.TestCase): class stub_job(base_job.base_job): _job_directory = stub_job_directory @classmethod + # pylint: disable=E0202 def _find_base_directories(cls): return '/autodir', '/autodir/client', '/autodir/server' + # pylint: disable=E0202 def _find_resultdir(self): return '/autodir/results' self.job = stub_job() @@ -1366,9 +1368,11 @@ class test_make_outputdir(unittest.TestCase): self.resultdir = tempfile.mkdtemp(suffix='unittest') class stub_job(base_job.base_job): @classmethod + # pylint: disable=E0202 def _find_base_directories(cls): return '/autodir', '/autodir/client', '/autodir/server' @classmethod + # pylint: disable=E0202 def _find_resultdir(cls): return self.resultdir -- 1.8.1.4 _______________________________________________ Autotest-kernel mailing list [email protected] https://www.redhat.com/mailman/listinfo/autotest-kernel
