mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Fix typos in comments and test code (#122846)
This commit is contained in:
parent
9375b9ca3a
commit
253c6a0b2f
18 changed files with 28 additions and 28 deletions
|
@ -1194,14 +1194,14 @@ class SemaphoreTests(unittest.IsolatedAsyncioTestCase):
|
|||
self.assertEqual([2, 3], result)
|
||||
|
||||
async def test_acquire_fifo_order_4(self):
|
||||
# Test that a successfule `acquire()` will wake up multiple Tasks
|
||||
# Test that a successful `acquire()` will wake up multiple Tasks
|
||||
# that were waiting in the Semaphore queue due to FIFO rules.
|
||||
sem = asyncio.Semaphore(0)
|
||||
result = []
|
||||
count = 0
|
||||
|
||||
async def c1(result):
|
||||
# First task immediatlly waits for semaphore. It will be awoken by c2.
|
||||
# First task immediately waits for semaphore. It will be awoken by c2.
|
||||
self.assertEqual(sem._value, 0)
|
||||
await sem.acquire()
|
||||
# We should have woken up all waiting tasks now.
|
||||
|
@ -1475,7 +1475,7 @@ class BarrierTests(unittest.IsolatedAsyncioTestCase):
|
|||
# first time waiting
|
||||
await barrier.wait()
|
||||
|
||||
# after wainting once for all tasks
|
||||
# after waiting once for all tasks
|
||||
if rewait_n > 0:
|
||||
rewait_n -= 1
|
||||
# wait again only for rewait tasks
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue