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

Method test_blake2_update_over_4gb

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

Source from the content-addressed store, hash-verified

445
446 @requires_resource('cpu')
447 def test_blake2_update_over_4gb(self):
448 # blake2s or blake2b doesn't matter based on how our C code is structured, this tests the
449 # common loop macro logic.
450 zero_1mb = b"\0" * 1024 * 1024
451 h = hashlib.blake2s()
452 for i in range(0, 4096):
453 h.update(zero_1mb)
454 h.update(b"hello world")
455 self.assertEqual(h.hexdigest(), "8a268e83dd30528bc0907fa2008c91de8f090a0b6e0e60a5ff0d999d8485526f")
456
457 def check(self, name, data, hexdigest, shake=False, **kwargs):
458 length = len(hexdigest)//2

Callers

nothing calls this directly

Calls 3

updateMethod · 0.45
assertEqualMethod · 0.45
hexdigestMethod · 0.45

Tested by

no test coverage detected