(self)
| 1230 | class PythonCopyTestCase(CopyBaseTestCase, unittest.TestCase): |
| 1231 | |
| 1232 | def test_attributes(self): |
| 1233 | # Testing if attributes are of same type. |
| 1234 | h1 = hmac.HMAC.__new__(hmac.HMAC) |
| 1235 | h1._init_old(b"key", b"msg", digestmod="sha256") |
| 1236 | self.assertIsNone(h1._hmac) |
| 1237 | self.assertIsNotNone(h1._inner) |
| 1238 | self.assertIsNotNone(h1._outer) |
| 1239 | |
| 1240 | h2 = h1.copy() |
| 1241 | self.assertIsNone(h2._hmac) |
| 1242 | self.assertIsNotNone(h2._inner) |
| 1243 | self.assertIsNotNone(h2._outer) |
| 1244 | self.assertEqual(type(h1._inner), type(h2._inner)) |
| 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. |
nothing calls this directly
no test coverage detected