gh-97545: Make Semaphore run faster. (#97549)

This commit is contained in:
Cyker Way 2022-09-26 19:38:00 -04:00 committed by GitHub
parent d68c37c0d0
commit 68c46ae68b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 23 deletions

View file

@ -844,9 +844,8 @@ class SemaphoreTests(unittest.IsolatedAsyncioTestCase):
sem.release()
sem.release()
self.assertEqual(2, sem._value)
self.assertEqual(0, sem._value)
await asyncio.sleep(0)
await asyncio.sleep(0)
self.assertEqual(0, sem._value)
self.assertEqual(3, len(result))