Matches any object that is equal to the specified object.
| 305 | |
| 306 | |
| 307 | class EqualTo(Also): |
| 308 | """Matches any object that is equal to the specified object.""" |
| 309 | |
| 310 | def __init__(self, pattern, obj): |
| 311 | super().__init__(pattern) |
| 312 | self.obj = obj |
| 313 | |
| 314 | def __repr__(self): |
| 315 | return repr(self.obj) |
| 316 | |
| 317 | def __str__(self): |
| 318 | return str(self.obj) |
| 319 | |
| 320 | def __getstate__(self): |
| 321 | return self.obj |
| 322 | |
| 323 | def _also(self, value): |
| 324 | return self.obj == value |
| 325 | |
| 326 | |
| 327 | class NotEqualTo(Also): |
no outgoing calls
no test coverage detected
searching dependent graphs…