(cls, *args, **kwargs)
| 776 | class MockCallbacks: |
| 777 | |
| 778 | def __new__(cls, *args, **kwargs): |
| 779 | r = Mock(name=cls.__name__) |
| 780 | cls.__init__(r, *args, **kwargs) |
| 781 | for key, value in vars(cls).items(): |
| 782 | if key not in ('__dict__', '__weakref__', '__new__', '__init__'): |
| 783 | if inspect.ismethod(value) or inspect.isfunction(value): |
| 784 | r.__getattr__(key).side_effect = _bind(value, r) |
| 785 | else: |
| 786 | r.__setattr__(key, value) |
| 787 | return r |
no test coverage detected