Sentinel exception for tests.
| 424 | |
| 425 | |
| 426 | class ExpectedException(Exception): |
| 427 | """Sentinel exception for tests.""" |
| 428 | |
| 429 | def __eq__(self, other): |
| 430 | return ( |
| 431 | other is not None and |
| 432 | isinstance(other, ExpectedException) and |
| 433 | self.args == other.args |
| 434 | ) |
| 435 | |
| 436 | def __hash__(self): |
| 437 | return hash(self.args) |
| 438 | |
| 439 | |
| 440 | class UnpickleableException(Exception): |
no outgoing calls