Sentinel exception for tests.
| 329 | |
| 330 | |
| 331 | class ExpectedException(Exception): |
| 332 | """Sentinel exception for tests.""" |
| 333 | |
| 334 | def __eq__(self, other): |
| 335 | return ( |
| 336 | other is not None and |
| 337 | isinstance(other, ExpectedException) and |
| 338 | self.args == other.args |
| 339 | ) |
| 340 | |
| 341 | def __hash__(self): |
| 342 | return hash(self.args) |
| 343 | |
| 344 | |
| 345 | class UnpickleableException(Exception): |
no outgoing calls