Closed GoogleCodeExporter closed 9 years ago
may be
class CallableMixin(Base):
...
def _fixed_call(_mock_self, *args, **kwargs):
# can't use self in-case a function / method we are mocking uses self
# in the signature
_mock_self._mock_check_sig(*args, **kwargs)
return _mock_self._mock_call(*deepcopy(args), **deepcopy(kwargs))
Original comment by a.a.appe...@gmail.com
on 19 Aug 2014 at 3:02
Please see the documentation for "coping with mutable arguments".
Original comment by fuzzyman
on 20 Aug 2014 at 6:18
Original issue reported on code.google.com by
a.a.appe...@gmail.com
on 19 Aug 2014 at 2:38