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

Method test_copy

Lib/test/test_hmac.py:1078–1085  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1076 self.assertEqual(h.block_size, self.block_size)
1077
1078 def test_copy(self):
1079 # Test a generic copy() and the attributes it exposes.
1080 # See https://github.com/python/cpython/issues/142451.
1081 h1 = self.hmac_new(b"my secret key", digestmod=self.digestname)
1082 h2 = h1.copy()
1083 self.assertEqual(h1.name, h2.name)
1084 self.assertEqual(h1.digest_size, h2.digest_size)
1085 self.assertEqual(h1.block_size, h2.block_size)
1086
1087 def test_repr(self):
1088 # HMAC object representation may differ across implementations

Callers

nothing calls this directly

Calls 3

hmac_newMethod · 0.45
copyMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected