MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_copy_inst_getinitargs

Method test_copy_inst_getinitargs

Lib/test/test_copy.py:182–191  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

180 self.assertEqual(copy.copy(x), x)
181
182 def test_copy_inst_getinitargs(self):
183 class C:
184 def __init__(self, foo):
185 self.foo = foo
186 def __getinitargs__(self):
187 return (self.foo,)
188 def __eq__(self, other):
189 return self.foo == other.foo
190 x = C(42)
191 self.assertEqual(copy.copy(x), x)
192
193 def test_copy_inst_getnewargs(self):
194 class C(int):

Callers

nothing calls this directly

Calls 3

CClass · 0.70
assertEqualMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected