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

Method test_reset

Lib/test/_test_multiprocessing.py:2176–2187  ·  view source on GitHub ↗

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

(self)

Source from the content-addressed store, hash-verified

2174 results3.append(True)
2175
2176 def test_reset(self):
2177 """
2178 Test that a 'reset' on a barrier frees the waiting threads
2179 """
2180 results1 = self.DummyList()
2181 results2 = self.DummyList()
2182 results3 = self.DummyList()
2183 self.run_threads(self._test_reset_f,
2184 (self.barrier, results1, results2, results3))
2185 self.assertEqual(len(results1), 0)
2186 self.assertEqual(len(results2), self.N-1)
2187 self.assertEqual(len(results3), self.N)
2188
2189 @classmethod
2190 def _test_abort_and_reset_f(cls, barrier, barrier2,

Callers

nothing calls this directly

Calls 4

DummyListMethod · 0.95
run_threadsMethod · 0.95
lenFunction · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected