MCPcopy Index your code
hub / github.com/python/cpython / test_copying___code__

Method test_copying___code__

Lib/test/test_funcattrs.py:69–73  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

67 self.assertNotEqual(self.b, duplicate)
68
69 def test_copying___code__(self):
70 def test(): pass
71 self.assertEqual(test(), None)
72 test.__code__ = self.b.__code__
73 self.assertEqual(test(), 3) # self.b always returns 3, arbitrarily
74
75 def test_invalid___code___assignment(self):
76 def A(): pass

Callers

nothing calls this directly

Calls 2

testFunction · 0.90
assertEqualMethod · 0.45

Tested by

no test coverage detected