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

Method test_hexdigest

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

Source from the content-addressed store, hash-verified

355 self.assertEqual(sorted(builtin_constructor_cache), ['MD5', 'md5'])
356
357 def test_hexdigest(self):
358 for cons in self.hash_constructors:
359 h = cons(usedforsecurity=False)
360 if h.name in self.shakes:
361 self.assertIsInstance(h.digest(16), bytes)
362 self.assertEqual(hexstr(h.digest(16)), h.hexdigest(16))
363 else:
364 self.assertIsInstance(h.digest(), bytes)
365 self.assertEqual(hexstr(h.digest()), h.hexdigest())
366
367 def test_digest_length_overflow(self):
368 # See issue #34922

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected