(self)
| 56 | self.assertEqual(y.foo, x.foo) |
| 57 | |
| 58 | def test_copy_reduce_ex(self): |
| 59 | class C(object): |
| 60 | def __reduce_ex__(self, proto): |
| 61 | c.append(1) |
| 62 | return "" |
| 63 | def __reduce__(self): |
| 64 | self.fail("shouldn't call this") |
| 65 | c = [] |
| 66 | x = C() |
| 67 | y = copy.copy(x) |
| 68 | self.assertIs(y, x) |
| 69 | self.assertEqual(c, [1]) |
| 70 | |
| 71 | def test_copy_reduce(self): |
| 72 | class C(object): |
nothing calls this directly
no test coverage detected