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

Method test_realcopy

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

Source from the content-addressed store, hash-verified

1291 self.assertEqual(type(h1._outer), type(h2._outer))
1292
1293 def test_realcopy(self):
1294 # Testing if the copy method created a real copy.
1295 h1 = hmac.HMAC.__new__(hmac.HMAC)
1296 h1._init_old(b"key", b"msg", digestmod="sha256")
1297 h2 = h1.copy()
1298 # Using id() in case somebody has overridden __eq__/__ne__.
1299 self.assertNotEqual(id(h1), id(h2))
1300 self.assertNotEqual(id(h1._inner), id(h2._inner))
1301 self.assertNotEqual(id(h1._outer), id(h2._outer))
1302
1303 def test_equality(self):
1304 # Testing if the copy has the same digests.

Callers

nothing calls this directly

Calls 5

idFunction · 0.85
_init_oldMethod · 0.80
assertNotEqualMethod · 0.80
__new__Method · 0.45
copyMethod · 0.45

Tested by

no test coverage detected