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

Method test_abort_barrier

Lib/test/test_asyncio/test_locks.py:1713–1720  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1711 self.assertEqual(barrier.n_waiting, 0)
1712
1713 async def test_abort_barrier(self):
1714 barrier = asyncio.Barrier(1)
1715
1716 asyncio.create_task(barrier.abort())
1717 await asyncio.sleep(0)
1718
1719 self.assertEqual(barrier.n_waiting, 0)
1720 self.assertTrue(barrier.broken)
1721
1722 async def test_abort_barrier_when_tasks_half_draining_half_blocking(self):
1723 barrier = asyncio.Barrier(self.N)

Callers

nothing calls this directly

Calls 6

abortMethod · 0.95
BarrierMethod · 0.80
assertTrueMethod · 0.80
create_taskMethod · 0.45
sleepMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected