Commit 42a9ae9c authored by Denis Bilenko's avatar Denis Bilenko

test for issue #39

parent e65b64a4
import greentest
from gevent.coros import Semaphore
class TestTimeoutAcquire(greentest.TestCase):
# issue 39
def test_acquire_returns_false_after_timeout(self):
s = Semaphore(value=0)
result = s.acquire(timeout=0.01)
assert result is False, repr(result)
if __name__=='__main__':
greentest.main()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment