(self)
| 208 | self.assertEqual(y.foo, x.foo) |
| 209 | |
| 210 | def test_copy_inst_getnewargs_ex(self): |
| 211 | class C(int): |
| 212 | def __new__(cls, *, foo): |
| 213 | self = int.__new__(cls) |
| 214 | self.foo = foo |
| 215 | return self |
| 216 | def __getnewargs_ex__(self): |
| 217 | return (), {'foo': self.foo} |
| 218 | def __eq__(self, other): |
| 219 | return self.foo == other.foo |
| 220 | x = C(foo=42) |
| 221 | y = copy.copy(x) |
| 222 | self.assertIsInstance(y, C) |
| 223 | self.assertEqual(y, x) |
| 224 | self.assertIsNot(y, x) |
| 225 | self.assertEqual(y.foo, x.foo) |
| 226 | |
| 227 | def test_copy_inst_getstate(self): |
| 228 | class C: |
nothing calls this directly
no test coverage detected