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

Method test_empty_iterable

Lib/test/_test_multiprocessing.py:3142–3152  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3140
3141 @warnings_helper.ignore_fork_in_thread_deprecation_warnings()
3142 def test_empty_iterable(self):
3143 # See Issue 12157
3144 p = self.Pool(1)
3145
3146 self.assertEqual(p.map(sqr, []), [])
3147 self.assertEqual(list(p.imap(sqr, [])), [])
3148 self.assertEqual(list(p.imap_unordered(sqr, [])), [])
3149 self.assertEqual(p.map_async(sqr, []).get(), [])
3150
3151 p.close()
3152 p.join()
3153
3154 @warnings_helper.ignore_fork_in_thread_deprecation_warnings()
3155 def test_context(self):

Callers

nothing calls this directly

Calls 10

mapMethod · 0.95
imapMethod · 0.95
imap_unorderedMethod · 0.95
map_asyncMethod · 0.95
closeMethod · 0.95
joinMethod · 0.95
listClass · 0.85
PoolMethod · 0.45
assertEqualMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected