MCPcopy Index your code
hub / github.com/python/cpython / test_randbytes_256M

Method test_randbytes_256M

Lib/test/test_random.py:973–978  ·  view source on GitHub ↗
(self, size)

Source from the content-addressed store, hash-verified

971
972 @support.bigmemtest(size=2**29, memuse=1+16/15, dry_run=False)
973 def test_randbytes_256M(self, size):
974 self.gen.seed(2849427419)
975 x = self.gen.randbytes(size)
976 self.assertEqual(len(x), size)
977 self.assertEqual(x[:12].hex(), 'f6fd9ae63855ab91ea238b4f')
978 self.assertEqual(x[-12:].hex(), '0e7af69a84ee99bf4a11becc')
979
980 def test_sample_counts_equivalence(self):
981 # Test the documented strong equivalence to a sample with repeated elements.

Callers

nothing calls this directly

Calls 4

seedMethod · 0.45
randbytesMethod · 0.45
assertEqualMethod · 0.45
hexMethod · 0.45

Tested by

no test coverage detected