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

Method test_equality_new

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

Source from the content-addressed store, hash-verified

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().
1313 h1 = hmac.new(b"key", digestmod="sha256")
1314 h1.update(b"some random text")
1315 h2 = h1.copy()
1316 # Using id() in case somebody has overridden __eq__/__ne__.
1317 self.assertNotEqual(id(h1), id(h2))
1318 self.assertEqual(h1.digest(), h2.digest())
1319 self.assertEqual(h1.hexdigest(), h2.hexdigest())
1320
1321
1322class ExtensionCopyTestCase(CopyBaseTestCase):

Callers

nothing calls this directly

Calls 8

idFunction · 0.85
assertNotEqualMethod · 0.80
newMethod · 0.45
updateMethod · 0.45
copyMethod · 0.45
assertEqualMethod · 0.45
digestMethod · 0.45
hexdigestMethod · 0.45

Tested by

no test coverage detected