diff --git a/greentest/test__api_timeout.py b/greentest/test__api_timeout.py index d64f9d8..6c2e1ff 100644 --- a/greentest/test__api_timeout.py +++ b/greentest/test__api_timeout.py @@ -2,7 +2,7 @@ from __future__ import with_statement import unittest import weakref import time -from eventlet.api import sleep, timeout, TimeoutError +from eventlet.api import sleep, timeout, TimeoutError, _SilentException DELAY = 0.01 class Error(Exception): @@ -82,6 +82,19 @@ class Test(unittest.TestCase): sleep(DELAY*3) assert False, 'should not get there' + with timeout(DELAY, _SilentException()): + with timeout(DELAY*2, _SilentException()): + sleep(DELAY*3) + assert False, 'should not get there' + + # this case fails and there's no intent to fix it. + # just don't do it like that + #with timeout(DELAY, _SilentException): + # with timeout(DELAY*2, _SilentException): + # sleep(DELAY*3) + # assert False, 'should not get there' + + if __name__=='__main__': unittest.main()