Matches any object that is not equal to the specified object.
| 325 | |
| 326 | |
| 327 | class NotEqualTo(Also): |
| 328 | """Matches any object that is not equal to the specified object.""" |
| 329 | |
| 330 | def __init__(self, pattern, obj): |
| 331 | super().__init__(pattern) |
| 332 | self.obj = obj |
| 333 | |
| 334 | def __repr__(self): |
| 335 | return f"<!={self.obj!r}>" |
| 336 | |
| 337 | def _also(self, value): |
| 338 | return self.obj != value |
| 339 | |
| 340 | |
| 341 | class SameAs(Also): |
no outgoing calls
no test coverage detected
searching dependent graphs…