(self)
| 3811 | self.assertEqual(loaded, data) |
| 3812 | |
| 3813 | def test_int_pickling_efficiency(self): |
| 3814 | # Test compacity of int representation (see issue #12744) |
| 3815 | if self.py_version < (3, 3): |
| 3816 | self.skipTest('not supported in Python < 3.3') |
| 3817 | for proto in protocols: |
| 3818 | with self.subTest(proto=proto): |
| 3819 | pickles = [self.dumps(2**n, proto) for n in range(70)] |
| 3820 | sizes = list(map(len, pickles)) |
| 3821 | # the size function is monotonic |
| 3822 | self.assertEqual(sorted(sizes), sizes) |
| 3823 | if proto >= 2: |
| 3824 | for p in pickles: |
| 3825 | self.assertFalse(opcode_in_pickle(pickle.LONG, p)) |
| 3826 | |
| 3827 | def _check_pickling_with_opcode(self, obj, opcode, proto): |
| 3828 | pickled = self.dumps(obj, proto) |
nothing calls this directly
no test coverage detected