(self)
| 840 | int(big_value) |
| 841 | |
| 842 | def test_pylong_roundtrip(self): |
| 843 | from random import randrange, getrandbits |
| 844 | bits = 5000 |
| 845 | while bits <= 1_000_000: |
| 846 | bits += randrange(-100, 101) # break bitlength patterns |
| 847 | hibit = 1 << (bits - 1) |
| 848 | n = hibit | getrandbits(bits - 1) |
| 849 | assert n.bit_length() == bits |
| 850 | sn = str(n) |
| 851 | self.assertNotStartsWith(sn, '0') |
| 852 | self.assertEqual(n, int(sn)) |
| 853 | bits <<= 1 |
| 854 | |
| 855 | @support.requires_resource('cpu') |
| 856 | @unittest.skipUnless(_decimal, "C _decimal module required") |
nothing calls this directly
no test coverage detected