MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_sha256_update_over_4gb

Method test_sha256_update_over_4gb

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

Source from the content-addressed store, hash-verified

427
428 @requires_resource('cpu')
429 def test_sha256_update_over_4gb(self):
430 zero_1mb = b"\0" * 1024 * 1024
431 h = hashlib.sha256()
432 for i in range(0, 4096):
433 h.update(zero_1mb)
434 h.update(b"hello world")
435 self.assertEqual(h.hexdigest(), "a5364f7a52ebe2e25f1838a4ca715a893b6fd7a23f2a0d9e9762120da8b1bf53")
436
437 @requires_resource('cpu')
438 def test_sha3_256_update_over_4gb(self):

Callers

nothing calls this directly

Calls 4

sha256Method · 0.45
updateMethod · 0.45
assertEqualMethod · 0.45
hexdigestMethod · 0.45

Tested by

no test coverage detected