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

Method test_starmap

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

Source from the content-addressed store, hash-verified

2928 list(map(sqr, list(range(100)))))
2929
2930 def test_starmap(self):
2931 psmap = self.pool.starmap
2932 tuples = list(zip(range(10), range(9,-1, -1)))
2933 self.assertEqual(psmap(mul, tuples),
2934 list(itertools.starmap(mul, tuples)))
2935 tuples = list(zip(range(100), range(99,-1, -1)))
2936 self.assertEqual(psmap(mul, tuples, chunksize=20),
2937 list(itertools.starmap(mul, tuples)))
2938
2939 def test_starmap_async(self):
2940 tuples = list(zip(range(100), range(99,-1, -1)))

Callers

nothing calls this directly

Calls 3

listClass · 0.85
starmapMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected