(cls, *args, **kwargs)
| 797 | class MockCallbacks: |
| 798 | |
| 799 | def __new__(cls, *args, **kwargs): |
| 800 | r = Mock(name=cls.__name__) |
| 801 | cls.__init__(r, *args, **kwargs) |
| 802 | for key, value in vars(cls).items(): |
| 803 | if key not in ('__dict__', '__weakref__', '__new__', '__init__'): |
| 804 | if inspect.ismethod(value) or inspect.isfunction(value): |
| 805 | r.__getattr__(key).side_effect = _bind(value, r) |
| 806 | else: |
| 807 | r.__setattr__(key, value) |
| 808 | return r |
no test coverage detected