LGTM. Thanks, Jose
On Fri, Sep 27, 2013 at 10:44:50AM +0000, Michele Tartara wrote: > Accessing private methods of parent classes is bad, but it is sometimes the > best > approach for classes mocking them for testing reasons. > Selectively disable the related lint error just for the few functions that > need > to do it. > > Signed-off-by: Michele Tartara <[email protected]> > --- > test/py/cmdlib/testsupport/lock_manager_mock.py | 1 + > test/py/cmdlib/testsupport/processor_mock.py | 2 ++ > 2 files changed, 3 insertions(+) > > diff --git a/test/py/cmdlib/testsupport/lock_manager_mock.py > b/test/py/cmdlib/testsupport/lock_manager_mock.py > index 5c5f8f6..068086e 100644 > --- a/test/py/cmdlib/testsupport/lock_manager_mock.py > +++ b/test/py/cmdlib/testsupport/lock_manager_mock.py > @@ -31,6 +31,7 @@ class LockManagerMock(locking.GanetiLockManager): > """ > def __init__(self): > # reset singleton instance, there is a separate lock manager for every > test > + # pylint: disable=W0212 > self.__class__._instance = None > > super(LockManagerMock, self).__init__([], [], [], []) > diff --git a/test/py/cmdlib/testsupport/processor_mock.py > b/test/py/cmdlib/testsupport/processor_mock.py > index 5884dcf..5d39b47 100644 > --- a/test/py/cmdlib/testsupport/processor_mock.py > +++ b/test/py/cmdlib/testsupport/processor_mock.py > @@ -79,6 +79,7 @@ class ProcessorMock(mcpu.Processor): > return self.ExecOpCode(op, LogRecordingCallback(self)) > > def _ExecLU(self, lu): > + # pylint: disable=W0212 > if not self._lu_test_func: > return super(ProcessorMock, self)._ExecLU(lu) > else: > @@ -87,6 +88,7 @@ class ProcessorMock(mcpu.Processor): > return self._lu_test_func(lu) > > def _CheckLUResult(self, op, result): > + # pylint: disable=W0212 > if not self._lu_test_func: > return super(ProcessorMock, self)._CheckLUResult(op, result) > else: > -- > 1.7.10.4 > -- Jose Antonio Lopes Ganeti Engineering Google Germany GmbH Dienerstr. 12, 80331, München Registergericht und -nummer: Hamburg, HRB 86891 Sitz der Gesellschaft: Hamburg Geschäftsführer: Graham Law, Christine Elizabeth Flores Steuernummer: 48/725/00206 Umsatzsteueridentifikationsnummer: DE813741370
