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

Method test_action

Lib/test/_test_multiprocessing.py:2332–2339  ·  view source on GitHub ↗

Test the 'action' callback

(self)

Source from the content-addressed store, hash-verified

2330
2331 @warnings_helper.ignore_fork_in_thread_deprecation_warnings()
2332 def test_action(self):
2333 """
2334 Test the 'action' callback
2335 """
2336 results = self.DummyList()
2337 barrier = self.Barrier(self.N, action=AppendTrue(results))
2338 self.run_threads(self._test_action_f, (barrier, results))
2339 self.assertEqual(len(results), 1)
2340
2341 @classmethod
2342 def _test_abort_f(cls, barrier, results1, results2):

Callers

nothing calls this directly

Calls 5

DummyListMethod · 0.95
run_threadsMethod · 0.95
AppendTrueClass · 0.85
BarrierMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected