(self)
| 231 | self.assertEqual(y.foo, x.foo) |
| 232 | |
| 233 | def test_copy_inst_getstate(self): |
| 234 | class C: |
| 235 | def __init__(self, foo): |
| 236 | self.foo = foo |
| 237 | def __getstate__(self): |
| 238 | return {"foo": self.foo} |
| 239 | def __eq__(self, other): |
| 240 | return self.foo == other.foo |
| 241 | x = C(42) |
| 242 | self.assertEqual(copy.copy(x), x) |
| 243 | |
| 244 | def test_copy_inst_setstate(self): |
| 245 | class C: |
nothing calls this directly
no test coverage detected