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

Method test_equality

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

Source from the content-addressed store, hash-verified

1301 self.assertNotEqual(id(h1._outer), id(h2._outer))
1302
1303 def test_equality(self):
1304 # Testing if the copy has the same digests.
1305 h1 = hmac.HMAC(b"key", digestmod="sha256")
1306 h1.update(b"some random text")
1307 h2 = h1.copy()
1308 self.assertEqual(h1.digest(), h2.digest())
1309 self.assertEqual(h1.hexdigest(), h2.hexdigest())
1310
1311 def test_equality_new(self):
1312 # Testing if the copy has the same digests with hmac.new().

Callers

nothing calls this directly

Calls 7

updateMethod · 0.95
copyMethod · 0.95
digestMethod · 0.95
hexdigestMethod · 0.95
HMACMethod · 0.45
assertEqualMethod · 0.45
digestMethod · 0.45

Tested by

no test coverage detected