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

Method test_methods

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

Source from the content-addressed store, hash-verified

1108 block_size: int
1109
1110 def test_methods(self):
1111 h = self.hmac_new(b"my secret key", digestmod=self.digestname)
1112 self.assertIsInstance(h, self.hmac_class)
1113 self.assertIsNone(h.update(b"compute the hash of this text!"))
1114 self.assertIsInstance(h.digest(), bytes)
1115 self.assertIsInstance(h.hexdigest(), str)
1116 self.assertIsInstance(h.copy(), self.hmac_class)
1117
1118 def test_properties(self):
1119 h = self.hmac_new(b"my secret key", digestmod=self.digestname)

Callers

nothing calls this directly

Calls 7

assertIsInstanceMethod · 0.80
assertIsNoneMethod · 0.80
hmac_newMethod · 0.45
updateMethod · 0.45
digestMethod · 0.45
hexdigestMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected