Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/python/cpython
/ test_deepcopy_keepalive
Method
test_deepcopy_keepalive
Lib/test/test_copy.py:466–470 ·
view source on GitHub ↗
(self)
Source
from the content-addressed store, hash-verified
464
self.assertEqual(len(y), 1)
465
466
def
test_deepcopy_keepalive(self):
467
memo = {}
468
x = []
469
y = copy.deepcopy(x, memo)
470
self.assertIs(memo[id(memo)][0], x)
471
472
def
test_deepcopy_dont_memo_immutable(self):
473
memo = {}
Callers
nothing calls this directly
Calls
2
id
Function · 0.85
assertIs
Method · 0.45
Tested by
no test coverage detected