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

Method test_copy

Lib/test/test_coroutines.py:2110–2121  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2108 ([], [[[111, 112], [121, 122]], [[211, 212], [221, 222]]]))
2109
2110 def test_copy(self):
2111 async def func(): pass
2112 coro = func()
2113 with self.assertRaises(TypeError):
2114 copy.copy(coro)
2115
2116 aw = coro.__await__()
2117 try:
2118 with self.assertRaises(TypeError):
2119 copy.copy(aw)
2120 finally:
2121 aw.close()
2122
2123 def test_pickle(self):
2124 async def func(): pass

Callers

nothing calls this directly

Calls 5

funcFunction · 0.70
assertRaisesMethod · 0.45
copyMethod · 0.45
__await__Method · 0.45
closeMethod · 0.45

Tested by

no test coverage detected