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

Method test_abort

Lib/test/_test_multiprocessing.py:2355–2365  ·  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

2353
2354 @warnings_helper.ignore_fork_in_thread_deprecation_warnings()
2355 def test_abort(self):
2356 """
2357 Test that an abort will put the barrier in a broken state
2358 """
2359 results1 = self.DummyList()
2360 results2 = self.DummyList()
2361 self.run_threads(self._test_abort_f,
2362 (self.barrier, results1, results2))
2363 self.assertEqual(len(results1), 0)
2364 self.assertEqual(len(results2), self.N-1)
2365 self.assertTrue(self.barrier.broken)
2366
2367 @classmethod
2368 def _test_reset_f(cls, barrier, results1, results2, results3):

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected