(self)
| 3428 | self.assertIs(b.t(2), b) |
| 3429 | |
| 3430 | def test_method_bad_hash(self): |
| 3431 | class A: |
| 3432 | def __eq__(self, other): |
| 3433 | raise AssertionError |
| 3434 | def __hash__(self): |
| 3435 | raise AssertionError |
| 3436 | @functools.singledispatchmethod |
| 3437 | def t(self, arg): |
| 3438 | pass |
| 3439 | |
| 3440 | # Should not raise |
| 3441 | A().t(1) |
| 3442 | hash(A().t) |
| 3443 | A().t == A().t |
| 3444 | |
| 3445 | def test_method_no_reference_loops(self): |
| 3446 | # gh-127750: Created a strong reference to self |