(self)
| 5722 | |
| 5723 | @unittest.skip("TODO: RUSTPYTHON") |
| 5724 | def test_issue24097(self): |
| 5725 | # Slot name is freed inside __getattr__ and is later used. |
| 5726 | class S(str): # Not interned |
| 5727 | pass |
| 5728 | class A: |
| 5729 | __slotnames__ = [S('spam')] |
| 5730 | def __getattr__(self, attr): |
| 5731 | if attr == 'spam': |
| 5732 | A.__slotnames__[:] = [S('spam')] |
| 5733 | return 42 |
| 5734 | else: |
| 5735 | raise AttributeError |
| 5736 | |
| 5737 | import copyreg |
| 5738 | expected = (copyreg.__newobj__, (A,), (None, {'spam': 42}), None, None) |
| 5739 | self.assertEqual(A().__reduce_ex__(2), expected) # Shouldn't crash |
| 5740 | |
| 5741 | def test_object_reduce(self): |
| 5742 | # Issue #29914 |
nothing calls this directly
no test coverage detected