Mock cls.__eq__ to check whether it has been called or not. The behaviour of cls.__eq__ (side-effects included) is left as is.
(cls)
| 130 | |
| 131 | |
| 132 | def equal_wrapper(cls): |
| 133 | """Mock cls.__eq__ to check whether it has been called or not. |
| 134 | |
| 135 | The behaviour of cls.__eq__ (side-effects included) is left as is. |
| 136 | """ |
| 137 | eq = cls.__eq__ |
| 138 | return mock.patch.object(cls, "__eq__", autospec=True, wraps=eq) |
| 139 | |
| 140 | |
| 141 | def checkwarnings(*filters, quiet=False): |
no outgoing calls
no test coverage detected
searching dependent graphs…