mirror of
https://github.com/python/cpython.git
synced 2025-11-09 10:01:42 +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 @@ def test_acquire_cancel(self):
|
|||
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