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

Method test_reset

Lib/test/_test_multiprocessing.py:2386–2397  ·  view source on GitHub ↗

Test that a 'reset' on a barrier frees the waiting threads

(self)

Source from the content-addressed store, hash-verified

2384
2385 @warnings_helper.ignore_fork_in_thread_deprecation_warnings()
2386 def test_reset(self):
2387 """
2388 Test that a 'reset' on a barrier frees the waiting threads
2389 """
2390 results1 = self.DummyList()
2391 results2 = self.DummyList()
2392 results3 = self.DummyList()
2393 self.run_threads(self._test_reset_f,
2394 (self.barrier, results1, results2, results3))
2395 self.assertEqual(len(results1), 0)
2396 self.assertEqual(len(results2), self.N-1)
2397 self.assertEqual(len(results3), self.N)
2398
2399 @classmethod
2400 def _test_abort_and_reset_f(cls, barrier, barrier2,

Callers

nothing calls this directly

Calls 3

DummyListMethod · 0.95
run_threadsMethod · 0.95
assertEqualMethod · 0.45

Tested by

no test coverage detected