MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_context

Method test_context

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

Source from the content-addressed store, hash-verified

2890 p.join()
2891
2892 def test_context(self):
2893 if self.TYPE == 'processes':
2894 L = list(range(10))
2895 expected = [sqr(i) for i in L]
2896 with self.Pool(2) as p:
2897 r = p.map_async(sqr, L)
2898 self.assertEqual(r.get(), expected)
2899 p.join()
2900 self.assertRaises(ValueError, p.map_async, sqr, L)
2901
2902 @classmethod
2903 def _test_traceback(cls):

Callers

nothing calls this directly

Calls 8

listClass · 0.85
sqrFunction · 0.85
map_asyncMethod · 0.80
PoolMethod · 0.45
assertEqualMethod · 0.45
getMethod · 0.45
joinMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected