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

Method test_hexdigest

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

Source from the content-addressed store, hash-verified

394 self.assertEqual(h1.hexdigest(*size), h2.hexdigest(*size))
395
396 def test_hexdigest(self):
397 for cons in self.hash_constructors:
398 h = cons(usedforsecurity=False)
399 if h.name in self.shakes:
400 self.assertIsInstance(h.digest(16), bytes)
401 self.assertEqual(hexstr(h.digest(16)), h.hexdigest(16))
402 else:
403 self.assertIsInstance(h.digest(), bytes)
404 self.assertEqual(hexstr(h.digest()), h.hexdigest())
405
406 def test_shakes_zero_digest_length(self):
407 for constructor in self.shake_constructors:

Callers

nothing calls this directly

Calls 5

hexstrFunction · 0.85
assertIsInstanceMethod · 0.80
hexdigestMethod · 0.80
digestMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected