MCPcopy
hub / github.com/tornadoweb/tornado / test_timeout_concurrent_future

Method test_timeout_concurrent_future

tornado/test/gen_test.py:761–767  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

759
760 @gen_test
761 def test_timeout_concurrent_future(self):
762 # A concurrent future that does not resolve before the timeout.
763 with futures.ThreadPoolExecutor(1) as executor:
764 with self.assertRaises(gen.TimeoutError):
765 yield gen.with_timeout(
766 self.io_loop.time(), executor.submit(time.sleep, 0.1)
767 )
768
769 @gen_test
770 def test_completed_concurrent_future(self):

Callers

nothing calls this directly

Calls 2

timeMethod · 0.80
submitMethod · 0.45

Tested by

no test coverage detected