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 <mtartara@google.com>
Reviewed-by: Jose A. Lopes <jabolopes@google.com>
"""
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__([], [], [], [])
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:
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: