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

Method test_thousand

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

Source from the content-addressed store, hash-verified

2489
2490 @warnings_helper.ignore_fork_in_thread_deprecation_warnings()
2491 def test_thousand(self):
2492 if self.TYPE == 'manager':
2493 self.skipTest('test not appropriate for {}'.format(self.TYPE))
2494 passes = 1000
2495 lock = self.Lock()
2496 conn, child_conn = self.Pipe(False)
2497 for j in range(self.N):
2498 p = self.Process(target=self._test_thousand_f,
2499 args=(self.barrier, passes, child_conn, lock))
2500 p.start()
2501 self.addCleanup(p.join)
2502
2503 for i in range(passes):
2504 for j in range(self.N):
2505 self.assertEqual(conn.recv(), i)
2506
2507#
2508#

Callers

nothing calls this directly

Calls 9

skipTestMethod · 0.80
LockMethod · 0.80
PipeMethod · 0.80
addCleanupMethod · 0.80
formatMethod · 0.45
ProcessMethod · 0.45
startMethod · 0.45
assertEqualMethod · 0.45
recvMethod · 0.45

Tested by

no test coverage detected