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

Method test_sha3_256_update_over_4gb

Lib/test/test_hashlib.py:506–512  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

504
505 @requires_resource('cpu')
506 def test_sha3_256_update_over_4gb(self):
507 zero_1mb = b"\0" * 1024 * 1024
508 h = hashlib.sha3_256()
509 for i in range(0, 4096):
510 h.update(zero_1mb)
511 h.update(b"hello world")
512 self.assertEqual(h.hexdigest(), "e2d4535e3b613135c14f2fe4e026d7ad8d569db44901740beffa30d430acb038")
513
514 @requires_resource('cpu')
515 @requires_blake2

Callers

nothing calls this directly

Calls 3

hexdigestMethod · 0.80
updateMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected