mirror of
https://github.com/python/cpython.git
synced 2025-08-30 13:38:43 +00:00
asyncio: Change bounded semaphore into a subclass, like threading.[Bounded]Semaphore.
This commit is contained in:
parent
dcd340eeeb
commit
085869bfee
2 changed files with 20 additions and 18 deletions
|
@ -805,7 +805,7 @@ class SemaphoreTests(unittest.TestCase):
|
|||
self.assertFalse(sem._waiters)
|
||||
|
||||
def test_release_not_acquired(self):
|
||||
sem = locks.Semaphore(bound=True, loop=self.loop)
|
||||
sem = locks.BoundedSemaphore(loop=self.loop)
|
||||
|
||||
self.assertRaises(ValueError, sem.release)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue