(self)
| 580 | self.assertIsInstance(ud, collections.UserDict) |
| 581 | |
| 582 | def test_pop(self): |
| 583 | TestMappingProtocol.test_pop(self) |
| 584 | |
| 585 | class Exc(Exception): pass |
| 586 | |
| 587 | class BadHash(object): |
| 588 | fail = False |
| 589 | def __hash__(self): |
| 590 | if self.fail: |
| 591 | raise Exc() |
| 592 | else: |
| 593 | return 42 |
| 594 | |
| 595 | d = self._empty_mapping() |
| 596 | x = BadHash() |
| 597 | d[x] = 42 |
| 598 | x.fail = True |
| 599 | self.assertRaises(Exc, d.pop, x) |
| 600 | |
| 601 | def test_mutatingiteration(self): |
| 602 | d = self._empty_mapping() |
nothing calls this directly
no test coverage detected