(self)
| 197 | self.assertEqual(copy.copy(x), x) |
| 198 | |
| 199 | def test_copy_inst_getnewargs(self): |
| 200 | class C(int): |
| 201 | def __new__(cls, foo): |
| 202 | self = int.__new__(cls) |
| 203 | self.foo = foo |
| 204 | return self |
| 205 | def __getnewargs__(self): |
| 206 | return self.foo, |
| 207 | def __eq__(self, other): |
| 208 | return self.foo == other.foo |
| 209 | x = C(42) |
| 210 | y = copy.copy(x) |
| 211 | self.assertIsInstance(y, C) |
| 212 | self.assertEqual(y, x) |
| 213 | self.assertIsNot(y, x) |
| 214 | self.assertEqual(y.foo, x.foo) |
| 215 | |
| 216 | def test_copy_inst_getnewargs_ex(self): |
| 217 | class C(int): |
nothing calls this directly
no test coverage detected