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

Method test_name_attribute

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

Source from the content-addressed store, hash-verified

381 digest(length)
382
383 def test_name_attribute(self):
384 for cons in self.hash_constructors:
385 h = cons(usedforsecurity=False)
386 self.assertIsInstance(h.name, str)
387 if h.name in self.supported_hash_names:
388 self.assertIn(h.name, self.supported_hash_names)
389 else:
390 self.assertNotIn(h.name, self.supported_hash_names)
391 self.assertEqual(
392 h.name,
393 hashlib.new(h.name, usedforsecurity=False).name
394 )
395
396 def test_large_update(self):
397 aas = b'a' * 128

Callers

nothing calls this directly

Calls 5

assertIsInstanceMethod · 0.80
assertInMethod · 0.80
assertNotInMethod · 0.80
assertEqualMethod · 0.45
newMethod · 0.45

Tested by

no test coverage detected