(self)
| 1790 | f'when serializing {REX.__module__}.REX object']) |
| 1791 | |
| 1792 | def test_bad_reconstructor(self): |
| 1793 | obj = REX((42, ())) |
| 1794 | for proto in protocols: |
| 1795 | with self.subTest(proto=proto): |
| 1796 | with self.assertRaises(pickle.PicklingError) as cm: |
| 1797 | self.dumps(obj, proto) |
| 1798 | self.assertEqual(str(cm.exception), |
| 1799 | 'first item of the tuple returned by __reduce__ ' |
| 1800 | 'must be callable, not int') |
| 1801 | self.assertEqual(cm.exception.__notes__, [ |
| 1802 | f'when serializing {REX.__module__}.REX object']) |
| 1803 | |
| 1804 | def test_unpickleable_reconstructor(self): |
| 1805 | obj = REX((UnpickleableCallable(), ())) |
nothing calls this directly
no test coverage detected