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

Method test_abort

Lib/test/_test_multiprocessing.py:2146–2156  ·  view source on GitHub ↗

Test that an abort will put the barrier in a broken state

(self)

Source from the content-addressed store, hash-verified

2144 barrier.abort()
2145
2146 def test_abort(self):
2147 """
2148 Test that an abort will put the barrier in a broken state
2149 """
2150 results1 = self.DummyList()
2151 results2 = self.DummyList()
2152 self.run_threads(self._test_abort_f,
2153 (self.barrier, results1, results2))
2154 self.assertEqual(len(results1), 0)
2155 self.assertEqual(len(results2), self.N-1)
2156 self.assertTrue(self.barrier.broken)
2157
2158 @classmethod
2159 def _test_reset_f(cls, barrier, results1, results2, results3):

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected