(self)
| 1245 | self.assertEqual(type(h1._outer), type(h2._outer)) |
| 1246 | |
| 1247 | def test_realcopy(self): |
| 1248 | # Testing if the copy method created a real copy. |
| 1249 | h1 = hmac.HMAC.__new__(hmac.HMAC) |
| 1250 | h1._init_old(b"key", b"msg", digestmod="sha256") |
| 1251 | h2 = h1.copy() |
| 1252 | # Using id() in case somebody has overridden __eq__/__ne__. |
| 1253 | self.assertNotEqual(id(h1), id(h2)) |
| 1254 | self.assertNotEqual(id(h1._inner), id(h2._inner)) |
| 1255 | self.assertNotEqual(id(h1._outer), id(h2._outer)) |
| 1256 | |
| 1257 | def test_equality(self): |
| 1258 | # Testing if the copy has the same digests. |
nothing calls this directly
no test coverage detected