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

Method test_copy_atomic

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

Source from the content-addressed store, hash-verified

91 # Type-specific _copy_xxx() methods
92
93 def test_copy_atomic(self):
94 class NewStyle:
95 pass
96 def f():
97 pass
98 class WithMetaclass(metaclass=abc.ABCMeta):
99 pass
100 tests = [None, ..., NotImplemented,
101 42, 2**100, 3.14, True, False, 1j,
102 "hello", "hello\u1234", f.__code__,
103 b"world", bytes(range(256)), range(10), slice(1, 10, 2),
104 NewStyle, max, WithMetaclass, property()]
105 for x in tests:
106 self.assertIs(copy.copy(x), x)
107
108 def test_copy_list(self):
109 x = [1, 2, 3]

Callers

nothing calls this directly

Calls 4

sliceClass · 0.85
propertyClass · 0.85
assertIsMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected