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

Method test_filling_one_task

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

Source from the content-addressed store, hash-verified

1349 self.assertFalse(barrier.broken)
1350
1351 async def test_filling_one_task(self):
1352 barrier = asyncio.Barrier(1)
1353
1354 async def f():
1355 async with barrier as i:
1356 return True
1357
1358 ret = await f()
1359
1360 self.assertTrue(ret)
1361 self.assertEqual(barrier.n_waiting, 0)
1362 self.assertFalse(barrier.broken)
1363
1364 async def test_filling_one_task_twice(self):
1365 barrier = asyncio.Barrier(1)

Callers

nothing calls this directly

Calls 5

BarrierMethod · 0.80
assertTrueMethod · 0.80
assertFalseMethod · 0.80
fFunction · 0.50
assertEqualMethod · 0.45

Tested by

no test coverage detected