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

Method test_pool_initializer

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

Source from the content-addressed store, hash-verified

5482
5483 @warnings_helper.ignore_fork_in_thread_deprecation_warnings()
5484 def test_pool_initializer(self):
5485 self.assertRaises(TypeError, multiprocessing.Pool, initializer=1)
5486 p = multiprocessing.Pool(1, initializer, (self.ns,))
5487 p.close()
5488 p.join()
5489 self.assertEqual(self.ns.test, 1)
5490
5491#
5492# Issue 5155, 5313, 5331: Test process in processes

Callers

nothing calls this directly

Calls 5

closeMethod · 0.95
joinMethod · 0.95
assertRaisesMethod · 0.45
PoolMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected