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

Method test_fails_before_timeout

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

Source from the content-addressed store, hash-verified

742
743 @gen_test
744 def test_fails_before_timeout(self):
745 future = Future() # type: Future[str]
746 self.io_loop.add_timeout(
747 datetime.timedelta(seconds=0.1),
748 lambda: future.set_exception(ZeroDivisionError()),
749 )
750 with self.assertRaises(ZeroDivisionError):
751 yield gen.with_timeout(datetime.timedelta(seconds=3600), future)
752
753 @gen_test
754 def test_already_resolved(self):

Callers

nothing calls this directly

Calls 1

add_timeoutMethod · 0.80

Tested by

no test coverage detected