asyncio: Change bounded semaphore into a subclass, like threading.[Bounded]Semaphore.

This commit is contained in:
Guido van Rossum 2013-11-23 15:09:16 -08:00
parent dcd340eeeb
commit 085869bfee
2 changed files with 20 additions and 18 deletions

View file

@ -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)