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

Method test_shakes_zero_digest_length

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

Source from the content-addressed store, hash-verified

404 self.assertEqual(hexstr(h.digest()), h.hexdigest())
405
406 def test_shakes_zero_digest_length(self):
407 for constructor in self.shake_constructors:
408 with self.subTest(constructor=constructor):
409 h = constructor(b'abcdef', usedforsecurity=False)
410 self.assertEqual(h.digest(0), b'')
411 self.assertEqual(h.hexdigest(0), '')
412
413 def test_shakes_invalid_digest_length(self):
414 # See https://github.com/python/cpython/issues/79103.

Callers

nothing calls this directly

Calls 5

constructorFunction · 0.85
hexdigestMethod · 0.80
subTestMethod · 0.45
assertEqualMethod · 0.45
digestMethod · 0.45

Tested by

no test coverage detected